hrms-api-probation/src/entities/AssignOutput.ts

47 lines
1.1 KiB
TypeScript
Raw Normal View History

2024-09-05 13:59:43 +07:00
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({
2025-11-26 11:47:13 +07:00
type: "longtext",
2024-09-05 13:59:43 +07:00
nullable: false,
comment: "ผลผลิตของงานที่คาดหวัง",
})
output_desc: string;
@Column({
2025-11-26 11:47:13 +07:00
type: "longtext",
2024-09-05 13:59:43 +07:00
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>;