add field org_053
This commit is contained in:
parent
cea12a540f
commit
31a7357c19
3 changed files with 16 additions and 14 deletions
|
|
@ -137,15 +137,13 @@ export class PosMaster extends EntityBase {
|
|||
default: null,
|
||||
})
|
||||
profileIdNextHolder: string;
|
||||
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง orgRevision",
|
||||
})
|
||||
orgRevisionId: string; //fk
|
||||
|
||||
|
||||
|
||||
@ManyToOne(() => OrgRevision, (orgRevision) => orgRevision.posMasters)
|
||||
@JoinColumn({ name: "orgRevisionId" })
|
||||
orgRevision: OrgRevision;
|
||||
|
|
@ -170,12 +168,12 @@ export class PosMaster extends EntityBase {
|
|||
@JoinColumn({ name: "orgChild4Id" })
|
||||
orgChild4: OrgChild4;
|
||||
|
||||
@ManyToOne(() => Profile, (profile) => profile.posMasters)
|
||||
@JoinColumn({ name: "profileIdCurrentHolder" })
|
||||
profile: Profile;
|
||||
@OneToOne(() => Profile)
|
||||
@JoinColumn()
|
||||
current_holder: Profile;
|
||||
|
||||
@ManyToOne(() => Profile, (profile) => profile.next_holder_posMasters)
|
||||
@JoinColumn({ name: "profileIdNextHolder" })
|
||||
@OneToOne(() => Profile)
|
||||
@JoinColumn()
|
||||
next_holder: Profile;
|
||||
|
||||
@OneToMany(() => Position, (position) => position.posMaster)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Entity, Column, OneToMany} from "typeorm";
|
||||
import { Entity, Column, OneToMany, OneToOne, JoinColumn} from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { PosMaster } from "./PosMaster";
|
||||
|
||||
|
|
@ -36,11 +36,13 @@ export class Profile extends EntityBase {
|
|||
})
|
||||
citizenId: string;
|
||||
|
||||
@OneToMany(() => PosMaster, (posMaster) => posMaster.profile)
|
||||
posMasters: PosMaster[];
|
||||
@OneToOne(() => PosMaster)
|
||||
@JoinColumn()
|
||||
current_holder: PosMaster;
|
||||
|
||||
@OneToMany(() => PosMaster, (posMaster) => posMaster.next_holder)
|
||||
next_holder_posMasters: PosMaster[];
|
||||
@OneToOne(() => PosMaster)
|
||||
@JoinColumn()
|
||||
next_holder: PosMaster;
|
||||
}
|
||||
|
||||
export class CreateProfile {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue