update entity OrgGroup and Org_013 - 15
This commit is contained in:
parent
6d136f8a97
commit
dde127a222
9 changed files with 273 additions and 24 deletions
|
|
@ -85,6 +85,12 @@ export class OrgChild1 extends EntityBase {
|
|||
})
|
||||
orgRootId: string;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
default: "00000000-0000-0000-0000-000000000000",
|
||||
})
|
||||
isAncestorDNA: string;
|
||||
|
||||
@ManyToOne(() => OrgRoot, orgRoot => orgRoot.orgChild1s)
|
||||
@JoinColumn({ name: "orgRootId" })
|
||||
orgRoot: OrgRoot;
|
||||
|
|
|
|||
|
|
@ -100,6 +100,12 @@ export class OrgChild2 extends EntityBase {
|
|||
})
|
||||
orgChild1Id: string;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
default: "00000000-0000-0000-0000-000000000000",
|
||||
})
|
||||
isAncestorDNA: string;
|
||||
|
||||
@ManyToOne(() => OrgChild1, orgChild1 => orgChild1.orgChild2s)
|
||||
@JoinColumn({ name: "orgChild1Id" })
|
||||
orgChild1: OrgChild1;
|
||||
|
|
@ -138,11 +144,8 @@ export class CreateOrgChild2 {
|
|||
@Column()
|
||||
orgChild2IsNormal: boolean;
|
||||
|
||||
@Column('uuid')
|
||||
orgRootId: string;
|
||||
|
||||
@Column('uuid')
|
||||
orgChild1Id: string;
|
||||
|
||||
}
|
||||
export type UpdateOrgChild2 = Partial<OrgChild2>;
|
||||
export type UpdateOrgChild2 = Partial<CreateOrgChild2>;
|
||||
|
|
|
|||
|
|
@ -97,6 +97,12 @@ export class OrgChild3 extends EntityBase {
|
|||
})
|
||||
orgChild2Id: string;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
default: "00000000-0000-0000-0000-000000000000",
|
||||
})
|
||||
isAncestorDNA: string;
|
||||
|
||||
@ManyToOne(() => OrgChild2, orgChild2 => orgChild2.orgChild3s)
|
||||
@JoinColumn({ name: "orgChild2Id" })
|
||||
orgChild2: OrgChild2;
|
||||
|
|
@ -140,4 +146,4 @@ export class CreateOrgChild3 {
|
|||
|
||||
}
|
||||
|
||||
export type UpdateOrgChild3 = Partial<CreateOrgChild3> & { orgChild3Rank?: OrgChild3Rank };;
|
||||
export type UpdateOrgChild3 = Partial<CreateOrgChild3> & { orgChild3Rank?: OrgChild3Rank };
|
||||
|
|
|
|||
|
|
@ -110,21 +110,49 @@ export class OrgChild4 extends EntityBase {
|
|||
default: "00000000-0000-0000-0000-000000000000",
|
||||
})
|
||||
orgChild3Id: string;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
default: "00000000-0000-0000-0000-000000000000",
|
||||
})
|
||||
isAncestorDNA: string;
|
||||
|
||||
// @ManyToOne(() => OrgRoot, orgRoot => orgRoot.orgChild4s)
|
||||
// @JoinColumn({ name: "orgRootId" })
|
||||
// orgRoot: OrgRoot;
|
||||
|
||||
// @ManyToOne(() => OrgChild1, orgChild1 => orgChild1.orgChild4s)
|
||||
// @JoinColumn({ name: "orgChild1Id" })
|
||||
// orgChild1: OrgChild1;
|
||||
|
||||
// @ManyToOne(() => OrgChild2, orgChild2 => orgChild2.orgChild4s)
|
||||
// @JoinColumn({ name: "orgChild2Id" })
|
||||
// orgChild2: OrgChild2;
|
||||
|
||||
@ManyToOne(() => OrgChild3, orgChild3 => orgChild3.orgChild4s)
|
||||
@JoinColumn({ name: "orgChild3Id" })
|
||||
orgChild3: OrgChild3;
|
||||
}
|
||||
|
||||
export class CreateOrgChild4 {
|
||||
|
||||
@Column()
|
||||
orgChild4Name: string;
|
||||
|
||||
@Column()
|
||||
orgChild4ShortName: string;
|
||||
|
||||
@Column()
|
||||
orgChild4Code: string;
|
||||
|
||||
@Column()
|
||||
orgChild4Rank: string;
|
||||
|
||||
@Column()
|
||||
orgChild4Order: number;
|
||||
|
||||
@Column()
|
||||
orgChild4PhoneEx: string;
|
||||
|
||||
@Column()
|
||||
orgChild4PhoneIn: string;
|
||||
|
||||
@Column()
|
||||
orgChild4Fax: string;
|
||||
|
||||
@Column()
|
||||
orgChild4IsNormal: boolean;
|
||||
|
||||
@Column('uuid')
|
||||
orgChild3Id: string;
|
||||
|
||||
}
|
||||
export type UpdateOrgChild4 = Partial<OrgChild4>;
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ export class OrgRevision extends EntityBase {
|
|||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: "tinyint",
|
||||
comment: "",
|
||||
default: false
|
||||
})
|
||||
orgRevisionIsCurrent: number;
|
||||
orgRevisionIsCurrent: boolean;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
|
|
@ -33,10 +33,10 @@ export class OrgRevision extends EntityBase {
|
|||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: "tinyint",
|
||||
comment: "",
|
||||
default: false
|
||||
})
|
||||
orgRevisionIsDraft: number;
|
||||
orgRevisionIsDraft: boolean;
|
||||
}
|
||||
|
||||
export type UpdateOrgRevision = Partial<OrgRevision>;
|
||||
|
|
|
|||
|
|
@ -85,6 +85,12 @@ export class OrgRoot extends EntityBase {
|
|||
})
|
||||
orgRevisionId: string;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
default: "00000000-0000-0000-0000-000000000000",
|
||||
})
|
||||
isAncestorDNA: string;
|
||||
|
||||
@OneToMany(() => OrgChild1, (orgChild1) => orgChild1.orgRoot)
|
||||
orgChild1s: OrgChild1[];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue