แก้ชื่อ tag

This commit is contained in:
Kittapath 2024-01-26 17:09:28 +07:00
parent 4b4f2423fa
commit f509e10f8c
9 changed files with 151 additions and 107 deletions

View file

@ -12,7 +12,6 @@ enum OrgChild1Rank {
@Entity("orgChild1")
export class OrgChild1 extends EntityBase {
@Column({
nullable: true,
comment: "ชื่อส่วนราชการ",
@ -75,7 +74,7 @@ export class OrgChild1 extends EntityBase {
@Column({
nullable: true,
comment: "สถานะของหน่วยงาน",
default: true
default: true,
})
orgChild1IsNormal: boolean;
@ -91,17 +90,15 @@ export class OrgChild1 extends EntityBase {
})
isAncestorDNA: string;
@ManyToOne(() => OrgRoot, orgRoot => orgRoot.orgChild1s)
@ManyToOne(() => OrgRoot, (orgRoot) => orgRoot.orgChild1s)
@JoinColumn({ name: "orgRootId" })
orgRoot: OrgRoot;
@OneToMany(() => OrgChild2, orgChild2 => orgChild2.orgChild1)
@OneToMany(() => OrgChild2, (orgChild2) => orgChild2.orgChild1)
orgChild2s: OrgChild2[];
}
export class CreateOrgChild1 {
@Column()
orgChild1Name: string;
@ -110,22 +107,21 @@ export class CreateOrgChild1 {
@Column()
orgChild1Code?: string;
@Column()
orgChild1Rank: string;
@Column()
orgChild1PhoneEx: string;
orgChild1PhoneEx?: string;
@Column()
orgChild1PhoneIn: string;
orgChild1PhoneIn?: string;
@Column()
orgChild1Fax: string;
orgChild1Fax?: string;
@Column('uuid')
@Column("uuid")
orgRootId: string;
}
export type UpdateOrgChild1 = Partial<CreateOrgChild1> & { orgChild1Rank?: OrgChild1Rank };

View file

@ -14,12 +14,12 @@ enum OrgChild2Rank {
}
@Entity("orgChild2")
export class OrgChild2 extends EntityBase {
// @Column({
// comment: "",
// length: 40,
// default: "00000000-0000-0000-0000-000000000000",
// })
// orgChild2Id: string;
// @Column({
// comment: "",
// length: 40,
// default: "00000000-0000-0000-0000-000000000000",
// })
// orgChild2Id: string;
@Column({
nullable: true,
@ -84,7 +84,7 @@ export class OrgChild2 extends EntityBase {
@Column({
nullable: true,
comment: "สถานะของหน่วยงาน", //ปกติ = 1 , ยุกเลิก = 0
default: true
default: true,
})
orgChild2IsNormal: boolean;
@ -106,17 +106,15 @@ export class OrgChild2 extends EntityBase {
})
isAncestorDNA: string;
@ManyToOne(() => OrgChild1, orgChild1 => orgChild1.orgChild2s)
@ManyToOne(() => OrgChild1, (orgChild1) => orgChild1.orgChild2s)
@JoinColumn({ name: "orgChild1Id" })
orgChild1: OrgChild1;
@OneToMany(() => OrgChild3, orgChild3 => orgChild3.orgChild2)
@OneToMany(() => OrgChild3, (orgChild3) => orgChild3.orgChild2)
orgChild3s: OrgChild3[];
}
export class CreateOrgChild2 {
@Column()
orgChild2Name: string;
@ -125,21 +123,20 @@ export class CreateOrgChild2 {
@Column()
orgChild2Code: string;
@Column()
orgChild2Rank: string;
@Column()
orgChild2PhoneEx: string;
orgChild2PhoneEx?: string;
@Column()
orgChild2PhoneIn: string;
orgChild2PhoneIn?: string;
@Column()
orgChild2Fax: string;
orgChild2Fax?: string;
@Column('uuid')
@Column("uuid")
orgChild1Id: string;
}
export type UpdateOrgChild2 = Partial<CreateOrgChild2>;
export type UpdateOrgChild2 = Partial<CreateOrgChild2> & { orgChild2Rank?: OrgChild2Rank };

View file

@ -12,7 +12,6 @@ enum OrgChild3Rank {
@Entity("orgChild3")
export class OrgChild3 extends EntityBase {
@Column({
nullable: true,
comment: "ชื่อส่วนราชการ",
@ -75,7 +74,7 @@ export class OrgChild3 extends EntityBase {
@Column({
nullable: true,
comment: "สถานะของหน่วยงาน",
default: true
default: true,
})
orgChild3IsNormal: boolean;
@ -103,17 +102,15 @@ export class OrgChild3 extends EntityBase {
})
isAncestorDNA: string;
@ManyToOne(() => OrgChild2, orgChild2 => orgChild2.orgChild3s)
@ManyToOne(() => OrgChild2, (orgChild2) => orgChild2.orgChild3s)
@JoinColumn({ name: "orgChild2Id" })
orgChild2: OrgChild2;
@OneToMany(() => OrgChild4, orgChild4 => orgChild4.orgChild3)
@OneToMany(() => OrgChild4, (orgChild4) => orgChild4.orgChild3)
orgChild4s: OrgChild4[];
}
export class CreateOrgChild3 {
@Column()
orgChild3Name: string;
@ -122,22 +119,21 @@ export class CreateOrgChild3 {
@Column()
orgChild3Code: string;
@Column()
orgChild3Rank: string;
@Column()
orgChild3PhoneEx: string;
orgChild3PhoneEx?: string;
@Column()
orgChild3PhoneIn: string;
orgChild3PhoneIn?: string;
@Column()
orgChild3Fax: string;
orgChild3Fax?: string;
@Column('uuid')
@Column("uuid")
orgChild2Id: string;
}
export type UpdateOrgChild3 = Partial<CreateOrgChild3> & { orgChild3Rank?: OrgChild3Rank };

View file

@ -13,12 +13,12 @@ enum OrgChild4Rank {
}
@Entity("orgChild4")
export class OrgChild4 extends EntityBase {
// @Column({
// comment: "",
// length: 40,
// default: "00000000-0000-0000-0000-000000000000",
// })
// orgChild4Id: string;
// @Column({
// comment: "",
// length: 40,
// default: "00000000-0000-0000-0000-000000000000",
// })
// orgChild4Id: string;
@Column({
nullable: true,
@ -83,7 +83,7 @@ export class OrgChild4 extends EntityBase {
@Column({
nullable: true,
comment: "สถานะของหน่วยงาน", //ปกติ = 1 , ยุกเลิก = 0
default: true
default: true,
})
orgChild4IsNormal: boolean;
@ -116,14 +116,13 @@ export class OrgChild4 extends EntityBase {
default: "00000000-0000-0000-0000-000000000000",
})
isAncestorDNA: string;
@ManyToOne(() => OrgChild3, orgChild3 => orgChild3.orgChild4s)
@ManyToOne(() => OrgChild3, (orgChild3) => orgChild3.orgChild4s)
@JoinColumn({ name: "orgChild3Id" })
orgChild3: OrgChild3;
}
export class CreateOrgChild4 {
@Column()
orgChild4Name: string;
@ -132,21 +131,20 @@ export class CreateOrgChild4 {
@Column()
orgChild4Code: string;
@Column()
orgChild4Rank: string;
@Column()
orgChild4PhoneEx: string;
orgChild4PhoneEx?: string;
@Column()
orgChild4PhoneIn: string;
orgChild4PhoneIn?: string;
@Column()
orgChild4Fax: string;
@Column('uuid')
orgChild4Fax?: string;
@Column("uuid")
orgChild3Id: string;
}
export type UpdateOrgChild4 = Partial<OrgChild4>;