Spaces:
Sleeping
Sleeping
import { | |
BaseEntity, | |
Column, | |
CreateDateColumn, | |
Entity, | |
JoinColumn, | |
ManyToOne, | |
PrimaryGeneratedColumn, | |
Relation, | |
} from 'typeorm'; | |
import { BranchEntity } from './branch.entity.js'; | |
import { UserEntity } from './user.entity.js'; | |
'receipts') | (|
export class ReceiptEntity extends BaseEntity { | |
() | |
id: number; | |
() | |
branch_id: string; | |
() => BranchEntity, (a) => a.receipts) | (|
name: 'branch_id' }) | ({|
branch: Relation<BranchEntity>; | |
default: 0 }) | ({|
income: number; | |
default: 0 }) | ({|
spend: number; | |
nullable: true }) | ({|
description: string; | |
default: 0 }) | ({|
type: number; | |
default: 0 }) | ({|
sub_type: number; | |
nullable: true }) | ({|
sender_id: string; | |
nullable: true }) | ({|
receiver_id: string; | |
() => UserEntity, (a) => a.out_receipts) | (|
name: 'sender_id' }) | ({|
sender: Relation<UserEntity>; | |
() => UserEntity, (a) => a.in_receipts) | (|
name: 'receiver_id' }) | ({|
receiver: Relation<UserEntity>; | |
() | |
created_at: Date; | |
} | |