start project
This commit is contained in:
commit
0703810fa3
62 changed files with 12665 additions and 0 deletions
179
src/entities/Personal.ts
Normal file
179
src/entities/Personal.ts
Normal file
|
|
@ -0,0 +1,179 @@
|
|||
import {
|
||||
Entity,
|
||||
Column,
|
||||
PrimaryGeneratedColumn,
|
||||
OneToOne,
|
||||
JoinColumn,
|
||||
OneToMany,
|
||||
} from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Assign } from "./Assign";
|
||||
|
||||
@Entity("personal")
|
||||
export class Personal extends EntityBase {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
personal_id: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "เลขที่คำสั่งบรรจุ",
|
||||
})
|
||||
order_number!: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
comment:
|
||||
"1 อยู่ระหว่างการทดลองปฏิบัติหน้าที่ราชการ, 2 พ้นการทดลองปฏิบัติหน้าที่ราชการ, 3 ไม่พ้นการทดลองปฏิบัติหน้าที่ราชการ, 4 ยุติการทดลองปฏิบัติหน้าที่ราชการเนื่องจากเปลี่ยนตำแหน่ง, 5 ยุติการทดลองปฏิบัติหน้าที่ราชการเนื่องจากลาออก, 6 ยุติการทดลองปฏิบัติหน้าที่ราชการเนื่องจากถึงแก่กรรม, 7 ขยายระยะเวลาทดลองปฏิบัติหน้าที่ราชการ, 8 ดึงรายชื่อไปออกคำสั่งแล้ว",
|
||||
default: 1,
|
||||
})
|
||||
probation_status: number;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
comment: "สถานะการใช้งาน 1 คือใช้งานปกติ, 0 คือไม่ใช้งาน",
|
||||
default: 1,
|
||||
})
|
||||
active: number;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "คำนำหน้าชื่อ",
|
||||
})
|
||||
prefixName: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
comment: "ชื่อ",
|
||||
})
|
||||
firstName: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
comment: "นามสกุล",
|
||||
})
|
||||
lastName: string;
|
||||
|
||||
@Column({
|
||||
type: Boolean,
|
||||
comment:
|
||||
"สถานะการทดลองงาน 1 คืออยู่ระหว่างการทดลองงาน, 0 คือไม่อยู่ระหว่างการทดลองงาน",
|
||||
default: 0,
|
||||
})
|
||||
isProbation: number;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ตำแหน่งในสายงาน",
|
||||
})
|
||||
positionName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "เลขที่ตำแหน่ง",
|
||||
})
|
||||
posNo: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ระดับตำแหน่ง",
|
||||
})
|
||||
positionLevelName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ด้าน/สาขา",
|
||||
})
|
||||
positionLineName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ประเภทตำแหน่ง",
|
||||
})
|
||||
positionTypeName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "หน่วยงาน",
|
||||
})
|
||||
orgRootName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "สังกัด",
|
||||
})
|
||||
organization: string;
|
||||
|
||||
@OneToMany(() => Assign, (assign: Assign) => assign.personal_id)
|
||||
@JoinColumn({ name: "personal_id" })
|
||||
assign: Assign[];
|
||||
}
|
||||
|
||||
export class CreatePersonal {
|
||||
@Column()
|
||||
personal_id: string;
|
||||
@Column()
|
||||
order_number: string;
|
||||
@Column()
|
||||
probation_status: number;
|
||||
// @Column()
|
||||
// profiles: PersonalProfile;
|
||||
@Column()
|
||||
createdUserId: string;
|
||||
@Column()
|
||||
createdFullName: string;
|
||||
@Column()
|
||||
updateUserId: string;
|
||||
@Column()
|
||||
updateFullName: string;
|
||||
@Column()
|
||||
prefixName: string;
|
||||
@Column()
|
||||
firstName: string;
|
||||
@Column()
|
||||
lastName: string;
|
||||
@Column()
|
||||
isProbation: number;
|
||||
@Column()
|
||||
positionName: string;
|
||||
@Column()
|
||||
posNo: string;
|
||||
@Column()
|
||||
positionLevelName: string;
|
||||
@Column()
|
||||
positionTypeName: string;
|
||||
@Column()
|
||||
positionLineName: string;
|
||||
@Column()
|
||||
orgRootName: string;
|
||||
@Column()
|
||||
organization: string;
|
||||
}
|
||||
|
||||
export class PostPersonal {
|
||||
id: string;
|
||||
prefix: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
isProbation: boolean;
|
||||
posTypeName?: string | null;
|
||||
posLevelName: string | null;
|
||||
position: string | null;
|
||||
posLineName?: string | null;
|
||||
posNo?: string | null;
|
||||
organization?: string;
|
||||
orgRootName: string | null;
|
||||
orgChild1Name?: string | null;
|
||||
orgChild2Name?: string | null;
|
||||
orgChild3Name?: string | null;
|
||||
orgChild4Name?: string | null;
|
||||
|
||||
order_number?: string;
|
||||
rank?: string | null;
|
||||
idcard?: string;
|
||||
positionField?: string | null;
|
||||
positionArea?: string | null;
|
||||
posExecutiveName?: string | null;
|
||||
positionExecutiveField?: string | null;
|
||||
}
|
||||
|
||||
export type UpdatePersonal = Partial<CreatePersonal>;
|
||||
Loading…
Add table
Add a link
Reference in a new issue