entity ย้ายสับเปลี่ยนตำแหน่ง
This commit is contained in:
parent
de27e1941b
commit
dd5662c14a
4 changed files with 292 additions and 1 deletions
37
src/entities/ChangePosition.ts
Normal file
37
src/entities/ChangePosition.ts
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { ProfileChangePosition } from "./ProfileChangePosition";
|
||||
|
||||
@Entity("changePosition")
|
||||
export class ChangePosition extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อรอบการย้ายสับเปลี่ยนตำแหน่ง",
|
||||
type: "text",
|
||||
default: null,
|
||||
})
|
||||
name: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: "datetime",
|
||||
comment: "วันที่ดำเนินการ",
|
||||
default: null,
|
||||
})
|
||||
date: Date;
|
||||
|
||||
@OneToMany(() => ProfileChangePosition, (x) => x.profile)
|
||||
profileChangePosition: ProfileChangePosition[];
|
||||
}
|
||||
|
||||
export class CreateChangePosition {
|
||||
name: string;
|
||||
date?: Date;
|
||||
status?: string;
|
||||
}
|
||||
|
||||
export type UpdateChangePosition = {
|
||||
name: string;
|
||||
date?: Date;
|
||||
status?: string;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue