Initial commit: ERP system with advance verification fixes

This commit is contained in:
System Administrator
2026-03-25 23:55:36 +07:00
commit 563ca12d76
5920 changed files with 828689 additions and 0 deletions
@@ -0,0 +1,48 @@
import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn, ManyToOne, OneToMany } from 'typeorm';
import { Contract } from './contract.entity';
import { FinancialRecord } from '../finance/financial-record.entity';
@Entity('payment_terms')
export class PaymentTerm {
@PrimaryGeneratedColumn('uuid')
id: string;
@Column({ type: 'uuid', nullable: true })
contract_id: string;
@ManyToOne(() => Contract, contract => contract.payment_terms)
contract: Contract;
@Column({ type: 'integer', nullable: false })
sequence: number;
@Column({ type: 'text', nullable: false })
description: string;
@Column({ type: 'decimal', precision: 5, scale: 2, nullable: false })
percentage: number;
@Column({ type: 'decimal', precision: 18, scale: 2, nullable: false })
amount: number;
@Column({ type: 'varchar', length: 10, nullable: false })
currency: string;
@Column({ type: 'decimal', precision: 18, scale: 2, nullable: false })
rmb_equivalent: number;
@Column({ type: 'date', nullable: true })
due_date: Date;
@Column({ type: 'varchar', length: 50, nullable: false })
status: string;
@CreateDateColumn()
created_at: Date;
@UpdateDateColumn()
updated_at: Date;
@OneToMany(() => FinancialRecord, financialRecord => financialRecord.payment_term)
financial_records: FinancialRecord[];
}