Spaces:
Sleeping
Sleeping
import { | |
BaseEntity, | |
Column, | |
CreateDateColumn, | |
DeleteDateColumn, | |
Entity, | |
ManyToOne, | |
OneToMany, | |
PrimaryColumn, | |
PrimaryGeneratedColumn, | |
Relation, | |
} from 'typeorm'; | |
import { UserEntity } from './user.entity.js'; | |
import { BranchMenuEntity } from './branch-menu.entity.js'; | |
import { ReceiptEntity } from './receipt.entity.js'; | |
'branches') | (|
export class BranchEntity extends BaseEntity { | |
() | |
id: string; | |
nullable: true }) | ({|
name: string; | |
nullable: true }) | ({|
image_url: string; | |
nullable: true }) | ({|
location: string; | |
nullable: true }) | ({|
phone_number: string; | |
() => UserEntity, (user) => user.branches) | (|
owner: Relation<UserEntity>; | |
() => BranchMenuEntity, (a) => a.branch) | (|
menu_items: Relation<BranchMenuEntity>[]; | |
() => ReceiptEntity, (a) => a.branch) | (|
receipts: Relation<ReceiptEntity>[]; | |
() | |
create_at: Date; | |
() | |
delete_at: Date; | |
} | |