start project
This commit is contained in:
commit
0703810fa3
62 changed files with 12665 additions and 0 deletions
55
src/entities/AssignCompetency.ts
Normal file
55
src/entities/AssignCompetency.ts
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Assign } from "./Assign";
|
||||
|
||||
@Entity("assignCompetency")
|
||||
export class AssignCompetency extends EntityBase {
|
||||
@Column({
|
||||
primary: true,
|
||||
type: "uuid",
|
||||
comment: "Id ของแบบมอบหมายงาน",
|
||||
})
|
||||
assign_id: string;
|
||||
|
||||
@Column({
|
||||
primary: true,
|
||||
type: "uuid",
|
||||
comment: "Id สมรรถนะหลัก",
|
||||
})
|
||||
competency_id: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
comment: "ระดับพฤติกรรม",
|
||||
default: 0,
|
||||
})
|
||||
competency_level: number;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อสมรรถนะหลัก",
|
||||
default: null,
|
||||
})
|
||||
competency_name: string;
|
||||
|
||||
@Column({
|
||||
type: "text",
|
||||
nullable: true,
|
||||
comment: "รายละเอียดสมรรถนะหลัก",
|
||||
default: null,
|
||||
})
|
||||
competency_description: string;
|
||||
|
||||
@ManyToOne(() => Assign, (assign: Assign) => assign.competencys)
|
||||
@JoinColumn({ name: "assign_id" })
|
||||
assign: Assign;
|
||||
}
|
||||
|
||||
export class CreateAssignCompetency {
|
||||
id: string;
|
||||
level: number;
|
||||
name: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
export type UpdateAssignCompetency = Partial<CreateAssignCompetency>;
|
||||
Loading…
Add table
Add a link
Reference in a new issue