diff --git a/src/entity/pharmacy/pharmacy_info.ts b/src/entity/pharmacy/pharmacy_info.ts index 5116b2b..8f551c5 100644 --- a/src/entity/pharmacy/pharmacy_info.ts +++ b/src/entity/pharmacy/pharmacy_info.ts @@ -9,6 +9,10 @@ import { JoinColumn, } from "typeorm"; import { Room } from "../room"; +import { Munisipo } from "../munisipo"; +import { Administrativu } from "../administrativu"; +import { Suco } from "../suco"; +import { Aldeia } from "../aldeia"; @Entity("pharmacy_info", { schema: "pharmacy" }) export class PharmacyInfo { @@ -24,17 +28,21 @@ export class PharmacyInfo { @Column({ type: "text", nullable: false }) address!: string; - @Column({ type: "text", nullable: true }) - munisipiu?: string; + @ManyToOne(() => Munisipo, { nullable: true }) + @JoinColumn({ name: "munisipiu_id" }) + munisipiu?: Munisipo; - @Column({ type: "text", nullable: true }) - postu_admin?: string; + @ManyToOne(() => Administrativu, { nullable: true }) + @JoinColumn({ name: "postu_admin_id" }) + postu_admin?: Administrativu; - @Column({ type: "text", nullable: true }) - suco?: string; + @ManyToOne(() => Suco, { nullable: true }) + @JoinColumn({ name: "suco_id" }) + suco?: Suco; - @Column({ type: "text", nullable: true }) - aldeia?: string; + @ManyToOne(() => Aldeia, { nullable: true }) + @JoinColumn({ name: "aldeia_id" }) + aldeia?: Aldeia; @Column({ type: "text", nullable: true }) phone?: string;