รายชื่อตามกลุ่มในโครงสร้าง
This commit is contained in:
parent
8786468761
commit
289b447b33
8 changed files with 269 additions and 42 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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[];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue