17 lines
379 B
TypeScript
17 lines
379 B
TypeScript
import { Entity, Property, ManyToOne, PrimaryKey } from '@mikro-orm/core';
|
|
import { Restaurant } from '../../restaurants/entities/restaurant.entity';
|
|
|
|
@Entity({ tableName: 'sms_logs' })
|
|
export class SmsLog {
|
|
@PrimaryKey()
|
|
id!: number;
|
|
|
|
@ManyToOne(() => Restaurant)
|
|
restaurant!: Restaurant;
|
|
|
|
@Property()
|
|
phone!: string;
|
|
|
|
@Property()
|
|
createdAt: Date = new Date();
|
|
} |