fist commit

This commit is contained in:
AdisakKanthawilang 2024-01-24 11:39:00 +07:00
parent 44ac172e54
commit 3c64d6b790
24 changed files with 11978 additions and 0 deletions

41
src/entities/base/Base.ts Normal file
View file

@ -0,0 +1,41 @@
import {
Entity,
PrimaryGeneratedColumn,
Column,
CreateDateColumn,
UpdateDateColumn,
} from "typeorm";
@Entity()
export class EntityBase {
@PrimaryGeneratedColumn("uuid")
id!: string;
@CreateDateColumn({ comment: "สร้างข้อมูลเมื่อ" })
createdAt!: Date;
@Column({
comment: "User Id ที่สร้างข้อมูล",
length: 40,
default: "00000000-0000-0000-0000-000000000000",
})
createdUserId!: String;
@UpdateDateColumn({ comment: "แก้ไขข้อมูลล่าสุดเมื่อ" })
lastUpdatedAt!: Date;
@Column({
comment: "User Id ที่แก้ไขข้อมูล",
length: 40,
default: "00000000-0000-0000-0000-000000000000",
})
lastUpdateUserId!: String;
@Column({ comment: "ชื่อ User ที่สร้างข้อมูล", length: 200, default: "string" })
createdFullName!: String;
@Column({ comment: "ชื่อ User ที่แก้ไขข้อมูลล่าสุด", length: 200, default: "string" })
lastUpdateFullName!: String;
}