import { Entity, Column, JoinColumn, ManyToOne, Double } from "typeorm"; import { EntityBase } from "./base/Base"; import { Command } from "./Command"; @Entity("commandOperator") export class CommandOperator extends EntityBase { @Column({ nullable: true, comment: "คีย์นอก(FK)ของตาราง profile", length: 40, default: null, }) profileId: string; @Column({ nullable: true, comment: "คำนำหน้า", length: 255, default: null, }) prefix: string; @Column({ nullable: true, comment: "ชื่อ", length: 255, default: null, }) firstName: string; @Column({ nullable: true, comment: "สกุล", length: 255, default: null, }) lastName: string; @Column({ nullable: true, comment: "เลขที่ตำแหน่ง", length: 255, default: null, }) posNo: string; @Column({ nullable: true, comment: "ประเภท", length: 255, default: null, }) posType: string; @Column({ nullable: true, comment: "ระดับ", length: 255, default: null, }) posLevel: string; @Column({ nullable: true, comment: "ตำแหน่งในสายงาน", length: 255, default: null, }) position: string; @Column({ nullable: true, comment: "ตำแหน่งทางการบริหาร", length: 255, default: null, }) positionExecutive: string; @Column({ nullable: true, comment: "บทบาทของเจ้าหน้าที่ดำเนินการ เช่น ผอ.สกจ. / รักษาการ ผอ.สกจ. / ผอ. กบห. / รักษาการ ผอ. กบห. / ผอ. ส่วน", length: 255, default: null, }) roleName: string; @Column({ nullable: true, comment: "ลำดับบทบาทของเจ้าหน้าที่ดำเนินการ", default: null, }) orderNo: number; @Column({ length: 40, comment: "คีย์นอก(FK)ของตาราง command", }) commandId: string; @ManyToOne(() => Command, (command) => command.commandOperators) @JoinColumn({ name: "commandId" }) command: Command; } export class CreateCommandOperatorDto { profileId: string; prefix?: string; firstName?: string; lastName?: string; posNo?: string; posType?: string; posLevel?: string; position?: string; positionExecutive?: string; roleName: string; }