create entity
This commit is contained in:
56
src/entity/procurement/procurement_category.ts
Normal file
56
src/entity/procurement/procurement_category.ts
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn } from "typeorm";
|
||||||
|
import { Status } from "../../types/status";
|
||||||
|
|
||||||
|
@Entity("procurement_category", { schema: "procurement" })
|
||||||
|
export class ProcurementCategory {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
unique: false,
|
||||||
|
length: 64,
|
||||||
|
})
|
||||||
|
code: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
unique: false,
|
||||||
|
length: 255,
|
||||||
|
})
|
||||||
|
name: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
unique: false,
|
||||||
|
length: 255,
|
||||||
|
})
|
||||||
|
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;
|
||||||
|
}
|
||||||
56
src/entity/procurement/procurement_vendor.ts
Normal file
56
src/entity/procurement/procurement_vendor.ts
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn } from "typeorm";
|
||||||
|
import { Status } from "../../types/status";
|
||||||
|
|
||||||
|
@Entity("procurement_vendor", { schema: "procurement" })
|
||||||
|
export class ProcurementVendor {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
unique: false,
|
||||||
|
length: 64,
|
||||||
|
})
|
||||||
|
code: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
unique: false,
|
||||||
|
length: 255,
|
||||||
|
})
|
||||||
|
name: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
unique: false,
|
||||||
|
length: 255,
|
||||||
|
})
|
||||||
|
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;
|
||||||
|
}
|
||||||
@ -1,3 +1,4 @@
|
|||||||
export * from "./schema/public";
|
export * from "./schema/public";
|
||||||
export * from "./schema/hrms";
|
export * from "./schema/hrms";
|
||||||
export * from "./schema/finances";
|
export * from "./schema/finances";
|
||||||
|
export * from "./schema/procurement";
|
||||||
|
|||||||
2
src/schema/procurement.ts
Normal file
2
src/schema/procurement.ts
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
export * from "../entity/procurement/procurement_category";
|
||||||
|
export * from "../entity/procurement/procurement_vendor";
|
||||||
Reference in New Issue
Block a user