รายชื่อตามกลุ่มในโครงสร้าง

This commit is contained in:
kittapath 2024-10-17 22:11:54 +07:00
parent 8786468761
commit 289b447b33
8 changed files with 269 additions and 42 deletions

View file

@ -4,6 +4,7 @@ import { CommandType } from "./CommandType";
import { CommandSend } from "./CommandSend";
import { CommandSalary } from "./CommandSalary";
import { CommandRecive } from "./CommandRecive";
import { ProfileSalary } from "./ProfileSalary";
@Entity("command")
export class Command extends EntityBase {
@ -151,6 +152,9 @@ export class Command extends EntityBase {
@OneToMany(() => CommandRecive, (commandRecive) => commandRecive.command)
commandRecives: CommandRecive[];
@OneToMany(() => ProfileSalary, (profileSalary) => profileSalary.command)
profileSalarys: ProfileSalary[];
}
export class CreateCommand {

View file

@ -195,6 +195,13 @@ export class PosMaster extends EntityBase {
})
authRoleId: string;
@Column({
comment: "สถานะออกคำสั่ง",
default: "PENDING",
length: 20,
})
statusReport: string;
@ManyToOne(() => AuthRole, (authRole) => authRole.posMasters)
@JoinColumn({ name: "authRoleId" })
authRole: AuthRole;

View file

@ -3,6 +3,7 @@ import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
import { ProfileEmployee } from "./ProfileEmployee";
import { ProfileSalaryHistory } from "./ProfileSalaryHistory";
import { Command } from "./Command";
@Entity("profileSalary")
export class ProfileSalary extends EntityBase {
@ -155,6 +156,18 @@ export class ProfileSalary extends EntityBase {
})
isGovernment: boolean;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง command",
default: null,
})
commandId: string;
@ManyToOne(() => Command, (command) => command.profileSalarys)
@JoinColumn({ name: "commandId" })
command: Command;
@OneToMany(() => ProfileSalaryHistory, (profileSalaryHistory) => profileSalaryHistory.histories)
profileSalaryHistories: ProfileSalaryHistory[];