import { Entity, Column, OneToMany } from "typeorm"; import { EntityBase } from "./base/Base"; import { SalaryRankEmployees } from "./SalaryRankEmployees"; @Entity("salaryEmployees") export class SalaryEmployees extends EntityBase { @Column({ comment: "ชื่อผัง", length: 255, }) name: string; @Column({ nullable: true, comment: "กลุ่มบัญชีการจ้าง", default: null, }) group: number; @Column({ comment: "สถานะการใช้งาน", }) isActive: boolean; @Column({ nullable: true, type: "datetime", comment: "ให้ไว้ ณ วันที่", default: null, }) date: Date; @Column({ nullable: true, type: "datetime", comment: "วันที่มีผลบังคับใช้", default: null, }) startDate: Date; @Column({ nullable: true, type: "datetime", comment: "วันที่สิ้นสุดบังคับใช้", default: null, }) endDate: Date; @Column({ nullable: true, comment: "คำอธิบาย", length: 255, default: null, }) details: string; @OneToMany( () => SalaryRankEmployees, (salaryRankEmployees) => salaryRankEmployees.salaryEmployees_, ) salaryRankEmployees_: SalaryRankEmployees[]; } export class CreateSalaryEmployee { @Column() name: string; @Column() group: number; @Column() isActive: boolean; @Column() date?: Date | null; @Column() startDate?: Date | null; @Column() endDate?: Date | null; @Column() details?: string | null; } export class UpdateSalaryEmployee { @Column() name: string; @Column() group: number; @Column() isActive: boolean; @Column() date?: Date | null; @Column() startDate?: Date | null; @Column() endDate?: Date | null; @Column() details?: string | null; } // export type UpdateSalary = Partial ;