no message

This commit is contained in:
kittapath 2024-10-01 17:51:48 +07:00
parent 5643cc67c4
commit 566ac716ee
3 changed files with 253 additions and 53 deletions

View file

@ -1,7 +1,6 @@
import { Entity, Column, JoinColumn, ManyToOne, OneToMany, Double } from "typeorm";
import { EntityBase } from "./base/Base";
import { Command } from "./Command";
import { Profile } from "./Profile";
@Entity("commandRecive")
export class CommandRecive extends EntityBase {
@ -37,22 +36,6 @@ export class CommandRecive extends EntityBase {
})
lastName: string;
@Column({
nullable: true,
comment: "ตำแหน่ง",
length: 255,
default: null,
})
position: string;
@Column({
nullable: true,
comment: "หน่วยงาน",
length: 255,
default: null,
})
org: string;
@Column({
nullable: true,
comment: "ลำดับแสดงผล",
@ -100,6 +83,14 @@ export class CommandRecive extends EntityBase {
})
mouthSalaryAmount: Double;
@Column({
nullable: true,
length: 40,
comment: "refId",
default: null,
})
refId: string;
@Column({
length: 40,
comment: "คีย์นอก(FK)ของตาราง command",
@ -110,15 +101,25 @@ export class CommandRecive extends EntityBase {
@JoinColumn({ name: "commandId" })
command: Command;
@Column({
length: 40,
comment: "คีย์นอก(FK)ของตาราง profile",
})
profileId: string;
// @Column({
// length: 40,
// comment: "คีย์นอก(FK)ของตาราง profile",
// })
// profileId: string;
@ManyToOne(() => Profile, (profile) => profile.commandRecives)
@JoinColumn({ name: "profileId" })
profile: Profile;
// @ManyToOne(() => Profile, (profile) => profile.commandRecives)
// @JoinColumn({ name: "profileId" })
// profile: Profile;
// @Column({
// length: 40,
// comment: "คีย์นอก(FK)ของตาราง profileEmployee",
// })
// profileEmployeeId: string;
// @ManyToOne(() => ProfileEmployee, (profileEmployee) => profileEmployee.commandRecives)
// @JoinColumn({ name: "profileEmployeeId" })
// profileEmployee: ProfileEmployee;
}
export class CreateCommandRecive {

View file

@ -29,10 +29,8 @@ import { ProfileDiscipline } from "./ProfileDiscipline";
import { ProfileEmployee } from "./ProfileEmployee";
import { ProfileEdit } from "./ProfileEdit";
import { ProfileDevelopment } from "./ProfileDevelopment";
import { OrgRoot } from "./OrgRoot";
import { PermissionOrg } from "./PermissionOrg";
import { CommandSend } from "./CommandSend";
import { CommandRecive } from "./CommandRecive";
import { DevelopmentRequest } from "./DevelopmentRequest";
@Entity("profile")
@ -380,9 +378,6 @@ export class Profile extends EntityBase {
@OneToMany(() => CommandSend, (v) => v.profile)
commandSends: CommandSend[];
@OneToMany(() => CommandRecive, (v) => v.profile)
commandRecives: CommandRecive[];
@ManyToOne(() => PosLevel, (posLevel) => posLevel.profiles)
@JoinColumn({ name: "posLevelId" })
posLevel: PosLevel;