From e000d1113fe79d8c336925f2cebbb01f7fdf11d6 Mon Sep 17 00:00:00 2001 From: fadlydev Date: Mon, 6 Jan 2025 20:36:49 +0700 Subject: [PATCH] add Asset Classification entity --- src/assetClasification.ts | 51 +++++++++++++++++++++++++++++++++++++++ src/index.ts | 3 ++- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 src/assetClasification.ts diff --git a/src/assetClasification.ts b/src/assetClasification.ts new file mode 100644 index 0000000..76fff7c --- /dev/null +++ b/src/assetClasification.ts @@ -0,0 +1,51 @@ + import { + Entity, + PrimaryGeneratedColumn, + Column, + CreateDateColumn, + UpdateDateColumn, + DeleteDateColumn, + } from 'typeorm'; + + @Entity('assetClassification') + export class AssetClassification { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ + nullable: false, + length: 128, + }) + name: string; + + @Column({ + nullable: true, + length: 255, + }) + description: string; + + @Column({ + nullable: false, + unique: true, + length: 64, + }) + code_id: string; + + @Column({ + nullable: true, + length: 128, + }) + updated_by: string; + + @Column() + @CreateDateColumn() + created_at: Date; + + @Column({ nullable: true }) + @UpdateDateColumn() + updated_at: Date; + + @Column({ nullable: true }) + @DeleteDateColumn() + deleted_at: Date; + } diff --git a/src/index.ts b/src/index.ts index a75161a..6a8cac2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -47,7 +47,7 @@ import { CreditApplication } from "./entity/credit_applications"; import { CreditApplicationStatus } from "./types/credit"; import { CreditApplicationForm } from "./entity/credit_application_forms"; import { Application } from "./entity/application"; - +import { AssetClassification } from "./assetClasification"; export { User, // UserRole, @@ -94,6 +94,7 @@ export { Goods, Supplier, AssetCategory, + AssetClassification, Ledger, CreditCompany, CreditDebtor,