add entity org part 2
This commit is contained in:
parent
8717494690
commit
d5e79acb82
11 changed files with 1442 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Profile } from "./Profile";
|
||||
import { ProfileDisciplineHistory } from "./ProfileDisciplineHistory";
|
||||
|
||||
@Entity("profileDiscipline")
|
||||
export class ProfileDiscipline extends EntityBase {
|
||||
|
|
@ -19,6 +20,55 @@ export class ProfileDiscipline extends EntityBase {
|
|||
})
|
||||
profileId: string;
|
||||
|
||||
@Column({
|
||||
comment: "สถานะการใช้งาน",
|
||||
default: false,
|
||||
})
|
||||
isActive: boolean;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ระดับความผิด",
|
||||
type: "text",
|
||||
default: null,
|
||||
})
|
||||
level: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "รายละเอียด",
|
||||
type: "text",
|
||||
default: null,
|
||||
})
|
||||
detail: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: "datetime",
|
||||
comment: "เอกสารอ้างอิง (ลงวันที่)",
|
||||
default: null,
|
||||
})
|
||||
refCommandDate: Date;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "เอกสารอ้างอิง (เลขที่คำสั่ง)",
|
||||
type: "text",
|
||||
default: null,
|
||||
})
|
||||
refCommandNo: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ล้างมลทิน",
|
||||
type: "text",
|
||||
default: null,
|
||||
})
|
||||
unStigma: string;
|
||||
|
||||
@OneToMany(() => ProfileDisciplineHistory, (profileDisciplineHistory) => profileDisciplineHistory.histories)
|
||||
profileDisciplineHistories: ProfileDisciplineHistory[];
|
||||
|
||||
@ManyToOne(() => Profile, (profile) => profile.profileDiscipline)
|
||||
@JoinColumn({ name: "profileId" })
|
||||
profile: Profile;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue