Merge branch 'develop' of github.com:Frappet/bma-ehr-organization into develop
This commit is contained in:
commit
551d2d70a4
4 changed files with 65 additions and 1 deletions
|
|
@ -1,6 +1,8 @@
|
|||
import { Entity, Column, OneToMany, OneToOne, JoinColumn, ManyToMany } from "typeorm";
|
||||
import { Entity, Column, OneToMany, OneToOne, JoinColumn, ManyToMany, ManyToOne } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { PosMaster } from "./PosMaster";
|
||||
import { PosLevel } from "./PosLevel";
|
||||
import { PosType } from "./PosType";
|
||||
|
||||
@Entity("profile")
|
||||
export class Profile extends EntityBase {
|
||||
|
|
@ -36,6 +38,28 @@ export class Profile extends EntityBase {
|
|||
})
|
||||
citizenId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ตำแหน่ง",
|
||||
default: null,
|
||||
length: 255,
|
||||
})
|
||||
position: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "ไอดีระดับตำแหน่ง",
|
||||
})
|
||||
posLevelId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "ไอดีประเภทตำแหน่",
|
||||
})
|
||||
posTypeId: string;
|
||||
|
||||
// @Column({
|
||||
// nullable: true,
|
||||
// length: 40,
|
||||
|
|
@ -61,6 +85,14 @@ export class Profile extends EntityBase {
|
|||
|
||||
@OneToMany(() => PosMaster, (posMaster) => posMaster.next_holder)
|
||||
next_holders: PosMaster[];
|
||||
|
||||
@ManyToOne(() => PosLevel, (posLevel) => posLevel.posLevelId)
|
||||
@JoinColumn({ name: "posLevelId" })
|
||||
posLevelsId: PosLevel;
|
||||
|
||||
@ManyToOne(() => PosType, (posType) => posType.posTypeId)
|
||||
@JoinColumn({ name: "posTypeId" })
|
||||
posTypesId: PosType;
|
||||
}
|
||||
|
||||
export class CreateProfile {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue