ผังเงินเดือนลูกจ้าง
This commit is contained in:
parent
0cf3d3dc85
commit
87f29e22e9
7 changed files with 699 additions and 61 deletions
66
src/entities/SalaryRankEmployees.ts
Normal file
66
src/entities/SalaryRankEmployees.ts
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn, OneToOne, OneToMany } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Salarys } from "./Salarys";
|
||||
import { SalaryEmployees } from "./SalaryEmployees";
|
||||
|
||||
@Entity("salaryRankEmployees")
|
||||
export class SalaryRankEmployees extends EntityBase {
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง salaryEmployee",
|
||||
})
|
||||
salaryEmployeeId: string;
|
||||
|
||||
@Column({
|
||||
type: "double",
|
||||
comment: "ลำดับขั้น",
|
||||
})
|
||||
step: number;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: "double",
|
||||
comment: "ค่าจ้างรายเดือน",
|
||||
default: null,
|
||||
})
|
||||
salaryMounth: number | null;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: "double",
|
||||
comment: "ค่าจ้างรายวัน",
|
||||
default: null,
|
||||
})
|
||||
salaryDay: number | null;
|
||||
|
||||
@ManyToOne(() => SalaryEmployees, (salaryEmployees) => salaryEmployees.salaryRankEmployees_)
|
||||
@JoinColumn({ name: "salaryEmployeeId" })
|
||||
salaryEmployees_: SalaryEmployees;
|
||||
}
|
||||
|
||||
export class CreateSalaryRankEmployee {
|
||||
@Column("uuid")
|
||||
salaryEmployeeId: string;
|
||||
|
||||
@Column()
|
||||
step: number;
|
||||
|
||||
@Column()
|
||||
salaryMounth?: number | null;
|
||||
|
||||
@Column()
|
||||
salaryDay?: number | null;
|
||||
}
|
||||
|
||||
export class UpdateSalaryRankEmployee {
|
||||
@Column()
|
||||
step: number;
|
||||
|
||||
@Column()
|
||||
salaryMounth?: number | null;
|
||||
|
||||
@Column()
|
||||
salaryDay?: number | null;
|
||||
}
|
||||
|
||||
// export type UpdateSalaryRank = Partial<Pick<CreateSalaryRank, Exclude<keyof CreateSalaryRank, 'salaryId'>>>;
|
||||
Loading…
Add table
Add a link
Reference in a new issue