created Salary entity
This commit is contained in:
parent
a429021f6d
commit
570ca11c84
5 changed files with 353 additions and 0 deletions
40
src/entities/PosType.ts
Normal file
40
src/entities/PosType.ts
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn, OneToOne, OneToMany } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { PosLevel } from "./PosLevel";
|
||||
import { Salarys } from "./Salarys";
|
||||
|
||||
@Entity("posType")
|
||||
export class PosType extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อประเภทตำแหน่ง (ทั่วไป วิชาการ อำนวยการ บริหาร)",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
posTypeName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment:
|
||||
"ระดับของประเภทตำแหน่ง ไว้ใช้ระบุว่าประเภทตำแหน่งนี้อยู่ระดับสูงหรือต่ำกว่ากัน โดย 1 = ต่ำกว่า , มากกว่า 1 = สูงกว่า ทั่วไป = 1 วิชาการ = 2 อำนวยการ = 3 บริหาร = 4",
|
||||
default: null,
|
||||
})
|
||||
posTypeRank: number;
|
||||
|
||||
@OneToMany(() => PosLevel, (posLevel) => posLevel.posType)
|
||||
posLevels: PosLevel[];
|
||||
|
||||
@OneToMany(() => Salarys, (salary) => salary.posType_)
|
||||
salarys_: Salarys[];
|
||||
|
||||
}
|
||||
|
||||
export class CreatePosType {
|
||||
@Column()
|
||||
posTypeName: string;
|
||||
|
||||
@Column()
|
||||
posTypeRank: number;
|
||||
}
|
||||
|
||||
export type UpdatePosType = Partial<CreatePosType>;
|
||||
Loading…
Add table
Add a link
Reference in a new issue