33 lines
1.0 KiB
TypeScript
33 lines
1.0 KiB
TypeScript
import { Column, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from "typeorm";
|
|
import { FinanceChecklistPayment } from "./finance_checklist_payment";
|
|
import { FinanceChecklistPaymentApprovalRole } from "../../types/finance";
|
|
import { HrmsEmployee } from "../hrms/hrms_employee";
|
|
|
|
@Entity("finance_checklist_payment_approval", { schema: "finances" })
|
|
export class FinanceChecklistPaymentApproval {
|
|
@PrimaryGeneratedColumn("uuid")
|
|
id: string;
|
|
|
|
@ManyToOne(() => FinanceChecklistPayment, (payment) => payment.approvals, { onDelete: "CASCADE" })
|
|
payment: FinanceChecklistPayment;
|
|
|
|
@Column({ type: "enum", enum: FinanceChecklistPaymentApprovalRole })
|
|
role: FinanceChecklistPaymentApprovalRole;
|
|
|
|
@ManyToOne(() => HrmsEmployee, { onDelete: "NO ACTION", nullable: true })
|
|
@JoinColumn()
|
|
employee: HrmsEmployee;
|
|
|
|
@Column()
|
|
name: string;
|
|
|
|
@Column({ nullable: true })
|
|
position: string;
|
|
|
|
@Column({ type: "date", nullable: true })
|
|
signed_date: Date;
|
|
|
|
@Column({ nullable: true, default: false })
|
|
is_signed: boolean;
|
|
}
|