no message

This commit is contained in:
kittapath 2024-10-18 16:11:22 +07:00
parent f7c7012ffe
commit f2d2e7b025
5 changed files with 26 additions and 3 deletions

View file

@ -5,6 +5,7 @@ import { CommandSend } from "./CommandSend";
import { CommandSalary } from "./CommandSalary";
import { CommandRecive } from "./CommandRecive";
import { ProfileSalary } from "./ProfileSalary";
import { ProfileSalaryHistory } from "./ProfileSalaryHistory";
@Entity("command")
export class Command extends EntityBase {
@ -155,6 +156,9 @@ export class Command extends EntityBase {
@OneToMany(() => ProfileSalary, (profileSalary) => profileSalary.command)
profileSalarys: ProfileSalary[];
@OneToMany(() => ProfileSalaryHistory, (profileSalaryHistory) => profileSalaryHistory.command)
profileSalaryHistorys: ProfileSalaryHistory[];
}
export class CreateCommand {

View file

@ -194,6 +194,7 @@ export class CreateProfileSalary {
positionType: string | null;
positionLevel: string | null;
refCommandNo: string | null;
commandId: string | null;
// commandType?: string | null;
templateDoc: string | null;
}

View file

@ -1,6 +1,7 @@
import { Entity, Column, JoinColumn, ManyToOne, Double } from "typeorm";
import { EntityBase } from "./base/Base";
import { ProfileSalary } from "./ProfileSalary";
import { Command } from "./Command";
@Entity("profileSalaryHistory")
export class ProfileSalaryHistory extends EntityBase {
@ -127,6 +128,18 @@ export class ProfileSalaryHistory extends EntityBase {
})
order: number;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง command",
default: null,
})
commandId: string;
@ManyToOne(() => Command, (command) => command.profileSalaryHistorys)
@JoinColumn({ name: "commandId" })
command: Command;
@ManyToOne(() => ProfileSalary, (profileSalary) => profileSalary.profileSalaryHistories)
@JoinColumn({ name: "profileSalaryId" })
histories: ProfileSalary;