update entity request order
This commit is contained in:
@ -31,10 +31,10 @@ export class RequestOrder {
|
||||
@Column({ nullable: false, length: 128, unique: true })
|
||||
order_number: string;
|
||||
|
||||
@Column({ type: 'timestamp', nullable: false }) // Ensuring timestamp type for date storage
|
||||
@Column({ type: 'timestamp', nullable: false })
|
||||
order_date: Date;
|
||||
|
||||
@Column({ type: 'decimal', precision: 10, scale: 2, nullable: false })
|
||||
@Column({ type: 'decimal', precision: 10, scale: 2, nullable: true })
|
||||
total_amount: number;
|
||||
|
||||
@Column({ type: 'varchar', nullable: false })
|
||||
@ -53,7 +53,7 @@ export class RequestOrder {
|
||||
purchasing_method: string;
|
||||
|
||||
// Supervisor Approval
|
||||
@Column({ type: 'uuid', nullable: true })
|
||||
@Column({ type: 'varchar', nullable: true })
|
||||
approved_by_spv: string | null;
|
||||
|
||||
@Column({ type: 'timestamp', nullable: true })
|
||||
@ -63,7 +63,7 @@ export class RequestOrder {
|
||||
spv_approval_status: ApprovalStatus;
|
||||
|
||||
// General Manager Approval
|
||||
@Column({ type: 'uuid', nullable: true })
|
||||
@Column({ type: 'varchar', nullable: true })
|
||||
approved_by_gm: string | null;
|
||||
|
||||
@Column({ type: 'timestamp', nullable: true })
|
||||
@ -72,6 +72,16 @@ export class RequestOrder {
|
||||
@Column({ type: 'enum', enum: ApprovalStatus, default: ApprovalStatus.PENDING })
|
||||
gm_approval_status: ApprovalStatus;
|
||||
|
||||
// General Affairs (GA) Approval
|
||||
@Column({ type: 'varchar', nullable: true })
|
||||
approved_by_ga: string | null;
|
||||
|
||||
@Column({ type: 'timestamp', nullable: true })
|
||||
ga_approval_date: Date | null;
|
||||
|
||||
@Column({ type: 'enum', enum: ApprovalStatus, default: ApprovalStatus.PENDING })
|
||||
ga_approval_status: ApprovalStatus;
|
||||
|
||||
// Relationship with Goods
|
||||
@OneToMany(() => Goods, (goods) => goods.id)
|
||||
goods: Goods[];
|
||||
@ -82,7 +92,6 @@ export class RequestOrder {
|
||||
|
||||
@OneToMany(() => RequestSubmission, (submission) => submission.request_order, { cascade: true })
|
||||
submissions: RequestSubmission[];
|
||||
|
||||
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
Reference in New Issue
Block a user