updated appoint chairman/committee
This commit is contained in:
parent
76d9be4da1
commit
5e117d1703
4 changed files with 318 additions and 0 deletions
58
src/entities/AppointDirector.ts
Normal file
58
src/entities/AppointDirector.ts
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
import { Entity, Column, PrimaryGeneratedColumn, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Appoint } from "./Appoint";
|
||||
|
||||
@Entity("appointDirector")
|
||||
export class AppointDirector extends EntityBase {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
comment: "id ของการแต่งตั้งกรรมการ",
|
||||
})
|
||||
appointId: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
comment: "id ของคน",
|
||||
})
|
||||
profileId: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
comment: "ชื่อ-นามสกุลของประธาน/กรรมการ",
|
||||
})
|
||||
name: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ตำแหน่ง",
|
||||
})
|
||||
position: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ประเภทตำแหน่ง",
|
||||
})
|
||||
positionType: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ระดับตำแหน่ง",
|
||||
})
|
||||
positionLevel: string;
|
||||
|
||||
@Column({
|
||||
type: "enum",
|
||||
enum: ["chairman", "committee"],
|
||||
nullable: false,
|
||||
default: "committee",
|
||||
comment: "บทบาท ประธาน/กรรมการ",
|
||||
})
|
||||
role: string;
|
||||
|
||||
@ManyToOne(() => Appoint, (appoint: Appoint) => appoint.directors)
|
||||
@JoinColumn({ name: "appointId" })
|
||||
appoint: Appoint;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue