ppob-backend/src/transaction/entities/coa.entity.ts
2023-01-06 13:28:14 +07:00

41 lines
642 B
TypeScript

import { Column, Entity } from 'typeorm';
import { BaseModel } from '../../config/basemodel.entity';
import { balanceType, coaType } from '../../helper/enum-list';
@Entity()
export class COA extends BaseModel {
@Column()
name: string;
@Column('text')
type: coaType;
@Column('text')
balanceType: balanceType;
@Column({
type: 'numeric',
precision: 20,
scale: 2,
})
amount: number;
@Column({
type: 'uuid',
nullable: true,
})
user: string;
@Column({
type: 'uuid',
nullable: true,
})
relatedUser: string;
@Column({
type: 'uuid',
nullable: true,
})
supplier: string;
}