From 56d84a09416ff1f89bbc2242face3a765174a67f Mon Sep 17 00:00:00 2001 From: Sony Surahmn Date: Wed, 31 Dec 2025 16:20:15 +0700 Subject: [PATCH] Add finance funding sources entity and update exports --- src/entity/finance/finance_funding_sources.ts | 56 +++++++++++++++++++ src/index.ts | 3 +- src/schema/finances.ts | 1 + 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 src/entity/finance/finance_funding_sources.ts create mode 100644 src/schema/finances.ts diff --git a/src/entity/finance/finance_funding_sources.ts b/src/entity/finance/finance_funding_sources.ts new file mode 100644 index 0000000..569aa8f --- /dev/null +++ b/src/entity/finance/finance_funding_sources.ts @@ -0,0 +1,56 @@ +import { Entity, PrimaryGeneratedColumn, Column, OneToMany, PrimaryColumn, CreateDateColumn, UpdateDateColumn, DeleteDateColumn } from "typeorm"; +import { Status } from "../../types/status"; + +@Entity("finance_funding_sources", { schema: "finances" }) +export class FinanceFundingSource { + @PrimaryGeneratedColumn("uuid") + id: string; + + @Column({ + nullable: false, + unique: false, + length: 64, + }) + code: string; + + @Column({ + nullable: false, + unique: false, + length: 64, + }) + name: string; + + @Column({ + nullable: true, + unique: false, + length: 64, + }) + description: string; + + @Column({ + nullable: false, + length: 64, + }) + status: Status; + + @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/index.ts b/src/index.ts index bad606b..9544fa4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,2 +1,3 @@ export * from "./schema/public"; -export * from "./schema/hrms"; \ No newline at end of file +export * from "./schema/hrms"; +export * from "./schema/finances"; diff --git a/src/schema/finances.ts b/src/schema/finances.ts new file mode 100644 index 0000000..add5a81 --- /dev/null +++ b/src/schema/finances.ts @@ -0,0 +1 @@ +export * from "../entity/finance/finance_funding_sources";