hrms-api-probation/src/entities/AssignOutput.ts
2025-11-26 11:47:13 +07:00

46 lines
1.1 KiB
TypeScript

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: "longtext",
nullable: false,
comment: "ผลผลิตของงานที่คาดหวัง",
})
output_desc: string;
@Column({
type: "longtext",
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<CreateAssignOutput>;