upd
This commit is contained in:
102
src/entity/finance/finance_payment_orders.ts
Normal file
102
src/entity/finance/finance_payment_orders.ts
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||||
|
import { HrmsEmployee } from "../hrms/hrms_employee";
|
||||||
|
import { FinanceCpv } from "./finance_cpvs";
|
||||||
|
import { FinanceBankAccount } from "./finance_bank_account";
|
||||||
|
import { FinancePaymentOrderStatusType } from "../../types/finance";
|
||||||
|
|
||||||
|
@Entity("finance_payment_orders", { schema: "finances" })
|
||||||
|
export class FinancePaymentOrder {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => FinanceCpv, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
cpv: FinanceCpv;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
unique: true,
|
||||||
|
length: 128,
|
||||||
|
})
|
||||||
|
code: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
payment_order_at: Date;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
paid_to_name: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
paid_to_title: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 128,
|
||||||
|
})
|
||||||
|
subject_type: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => FinanceBankAccount, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
bank_account: FinanceBankAccount;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
type: "float8",
|
||||||
|
})
|
||||||
|
amount: number;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
amount_words: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
objective: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => HrmsEmployee, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
approved_by: HrmsEmployee;
|
||||||
|
|
||||||
|
@ManyToOne(() => HrmsEmployee, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
authorized_by: HrmsEmployee;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
default: FinancePaymentOrderStatusType.draft,
|
||||||
|
length: 128,
|
||||||
|
})
|
||||||
|
status: FinancePaymentOrderStatusType;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
created_by: string;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@UpdateDateColumn()
|
||||||
|
updated_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
updated_by: string;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@DeleteDateColumn()
|
||||||
|
deleted_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
deleted_by: string;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user