import { Entity, Column, ManyToOne, JoinColumn } from "typeorm"; import { EntityBase } from "./base/Base"; import { Assign } from "./Assign"; @Entity("assignOutput") export class AssignOutput extends EntityBase { @Column({ primary: true, type: "int", comment: "Runnig number", }) id: number; @Column({ primary: true, nullable: false, type: "uuid", comment: "Id ของแบบมอบหมายงาน", }) assign_id: string; @Column({ type: "text", nullable: false, comment: "ผลผลิตของงานที่คาดหวัง", }) output_desc: string; @Column({ type: "text", nullable: false, comment: "ตัวชี้วัดความสําเร็จของงาน", }) indicator_desc: string; @ManyToOne(() => Assign, (assign: Assign) => assign.outputs) @JoinColumn({ name: "assign_id" }) assign: Assign; } export class CreateAssignOutput { output_desc: string; indicator_desc: string; } export type UpdateAssignOutput = Partial;