import { Entity, Column, ManyToOne, JoinColumn, OneToOne, OneToMany } from "typeorm"; import { EntityBase } from "./base/Base"; @Entity("position") export class Position extends EntityBase { @Column({ nullable: true, comment: "ชื่อตำแหน่งในสายงาน (ชื่อตำแหน่ง)", length: 255, default: "string", }) positionName: string; @Column({ nullable: true, comment: "สายงาน", length: 45, default: "string", }) positionField: string; @Column({ length: 40, comment: "ประเภทตำแหน่ง", default: "00000000-0000-0000-0000-000000000000", }) posTypeId: string; @Column({ length: 40, comment: "ระดับตำแหน่ง", default: "00000000-0000-0000-0000-000000000000", }) posLevelId: string; @Column({ nullable: true, length: 40, comment: "ตำแหน่งทางการบริหาร", default: "00000000-0000-0000-0000-000000000000", }) posExecutiveId: string; @Column({ nullable: true, comment: "ด้านทางการบริหาร", length: 255, default: "string", }) positionExecutiveField: string; @Column({ nullable: true, comment: "ด้าน/สาขา", length: 255, default: "string", }) positionArea: string; @Column({ nullable: true, comment: "เป็นตำแหน่งที่ถูกเลือกในรอบนั้นๆ หรือไม่?", }) positionIsSelected: boolean; @Column({ length: 40, comment: "เชื่อมโยงกับตารางเลขที่ตำแหน่ง", default: "00000000-0000-0000-0000-000000000000", }) posMasterId: string; } export class CreatePosition { @Column() positionName: string; @Column() positionField: string; @Column() posTypeId: string; @Column() posLevelId: string; @Column() posExecutiveId: string; @Column() positionExecutiveField: string; @Column() positionArea: string; } export type UpdatePosition = Partial;