From d45a2a46ff492f414e5110d56bf658b35b8ed4d6 Mon Sep 17 00:00:00 2001 From: fro1991 Date: Mon, 22 Dec 2025 11:33:32 +0700 Subject: [PATCH] uptade --- .../compliance_integrity_fact_employees.ts | 49 +++++++++++++++++++ src/entity/compliance_integrity_facts.ts | 46 +++++++++++++++++ src/schema/compliance.ts | 2 + 3 files changed, 97 insertions(+) create mode 100644 src/entity/compliance_integrity_fact_employees.ts create mode 100644 src/entity/compliance_integrity_facts.ts diff --git a/src/entity/compliance_integrity_fact_employees.ts b/src/entity/compliance_integrity_fact_employees.ts new file mode 100644 index 0000000..0f15451 --- /dev/null +++ b/src/entity/compliance_integrity_fact_employees.ts @@ -0,0 +1,49 @@ +import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm"; +import { Employee } from "./hrms_employee"; +import { User } from "./users"; +import { ComplianceIntegrityFact } from "./compliance_integrity_facts"; + +@Entity("compliance_integrity_fact_employees", { schema: "compliances" }) +export class ComplianceIntegrityFactEmployee { + @PrimaryGeneratedColumn("uuid") + id: string; + + @ManyToOne(() => ComplianceIntegrityFact, { onDelete: "NO ACTION", nullable: true }) + @JoinColumn() + integrity_fact: ComplianceIntegrityFact; + + @ManyToOne(() => Employee, { onDelete: "NO ACTION", nullable: true }) + @JoinColumn() + employee: Employee; + + @ManyToOne(() => User, { onDelete: "NO ACTION", nullable: true }) + @JoinColumn() + user: User; + + @Column({ + nullable: true, + length: 4096, + }) + file: string; + + @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; +} diff --git a/src/entity/compliance_integrity_facts.ts b/src/entity/compliance_integrity_facts.ts new file mode 100644 index 0000000..b3bec4c --- /dev/null +++ b/src/entity/compliance_integrity_facts.ts @@ -0,0 +1,46 @@ +import { Column, CreateDateColumn, DeleteDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm"; + +@Entity("compliance_integrity_facts", { schema: "compliances" }) +export class ComplianceIntegrityFact { + @PrimaryGeneratedColumn("uuid") + id: string; + + @Column({ + nullable: false, + length: 4, + }) + year: string; + Ò; + @Column({ + nullable: true, + length: 4096, + }) + description: string; + + @Column({ + nullable: true, + length: 4096, + }) + file: string; + + @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; +} diff --git a/src/schema/compliance.ts b/src/schema/compliance.ts index 5b8fab1..1cd389a 100644 --- a/src/schema/compliance.ts +++ b/src/schema/compliance.ts @@ -13,4 +13,6 @@ export * from "../entity/compliance_regulator_report_details"; export * from "../entity/compliance_futuru_cif_sync_logs"; export * from "../entity/compliance_cif_doubles"; export * from "../entity/compliance_cif_double_details"; +export * from "../entity/compliance_integrity_facts"; +export * from "../entity/compliance_integrity_fact_employees"; export * from "../types/compliance";