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