2024-03-13 10:43:50 +07:00
|
|
|
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
|
|
|
|
import { EntityBase } from "./base/Base";
|
|
|
|
|
import { ProfileOther } from "./ProfileOther";
|
|
|
|
|
|
|
|
|
|
@Entity("profileOtherHistory")
|
|
|
|
|
export class ProfileOtherHistory extends EntityBase {
|
|
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
length: 40,
|
|
|
|
|
comment: "คีย์นอก(FK)ของตาราง Profile",
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
2024-03-13 15:33:02 +07:00
|
|
|
profileOtherId: string;
|
2024-03-13 10:43:50 +07:00
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
comment: "รายละเอียด",
|
|
|
|
|
type: "text",
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
detail: string;
|
|
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
type: "datetime",
|
|
|
|
|
comment: "วันที่",
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
date: Date;
|
|
|
|
|
|
2026-02-12 11:47:53 +07:00
|
|
|
@Column({
|
|
|
|
|
nullable: false,
|
|
|
|
|
comment: "สถานะลบข้อมูล",
|
|
|
|
|
default: false,
|
|
|
|
|
})
|
|
|
|
|
isDeleted: boolean;
|
|
|
|
|
|
2024-03-13 10:43:50 +07:00
|
|
|
@ManyToOne(() => ProfileOther, (profileOther) => profileOther.profileOtherHistories)
|
2024-03-13 15:33:02 +07:00
|
|
|
@JoinColumn({ name: "profileOtherId" })
|
2024-03-13 10:43:50 +07:00
|
|
|
histories: ProfileOther;
|
|
|
|
|
}
|