SalaryPeriod Entity

This commit is contained in:
Bright 2024-02-22 14:08:43 +07:00
parent e2168292ea
commit 061be20d3b
2 changed files with 81 additions and 0 deletions

View file

@ -0,0 +1,63 @@
import { Entity, Column, ManyToOne, JoinColumn, OneToOne, OneToMany } from "typeorm";
import { EntityBase } from "./base/Base";
@Entity("salaryPeriod")
export class SalaryPeriod extends EntityBase {
@Column({
comment: "ประเภทผัง (SPECIAL->รอบพิเศษ,APR->รอบเมษายน,OCT->รอบตุลาคม)",
length: 255,
})
period: string;
@Column({
comment: "สถานะการใช้งาน",
default: false,
})
isActive: boolean;
@Column({
nullable: true,
type: "datetime",
comment: "วันที่มีผลบังคับใช้",
})
effectiveDate: Date;
@Column({
comment: "สถานะ",
length: 255,
default: "PENDING",
})
status?: string;
}
export class CreateSalaryPeriod {
@Column()
period: string;
@Column()
isActive: boolean;
@Column()
effectiveDate: Date;
@Column()
status?: string;
}
export class UpdateSalaryPeriod {
@Column()
period: string;
@Column()
isActive: boolean;
@Column()
effectiveDate: Date;
@Column()
status?: string;
}