update: Add relationships to administrative division entities in PatientGuarantor
This commit is contained in:
@ -10,12 +10,32 @@ import {
|
|||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { PatientGroup } from "./patient_group"; // Import entity PatientGroup
|
import { PatientGroup } from "./patient_group"; // Import entity PatientGroup
|
||||||
import { FareType } from "./faretype";
|
import { FareType } from "./faretype";
|
||||||
|
import { Administrativu } from "./administrativu";
|
||||||
|
import { Suco } from "./suco";
|
||||||
|
import { Aldeia } from "./aldeia";
|
||||||
|
import { Munisipo } from "./munisipo";
|
||||||
|
|
||||||
@Entity("patient_guarantor")
|
@Entity("patient_guarantor")
|
||||||
export class PatientGuarantor {
|
export class PatientGuarantor {
|
||||||
@PrimaryGeneratedColumn("uuid")
|
@PrimaryGeneratedColumn("uuid")
|
||||||
id!: string;
|
id!: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => Administrativu, { onDelete: "NO ACTION" })
|
||||||
|
@JoinColumn()
|
||||||
|
administrativu: Administrativu;
|
||||||
|
|
||||||
|
@ManyToOne(() => Munisipo, { onDelete: "NO ACTION" })
|
||||||
|
@JoinColumn()
|
||||||
|
munisipo: Munisipo;
|
||||||
|
|
||||||
|
@ManyToOne(() => Suco, { onDelete: "NO ACTION" })
|
||||||
|
@JoinColumn()
|
||||||
|
suco: Suco;
|
||||||
|
|
||||||
|
@ManyToOne(() => Aldeia, { onDelete: "NO ACTION" })
|
||||||
|
@JoinColumn()
|
||||||
|
aldeia: Aldeia;
|
||||||
|
|
||||||
// Nama penjamin pasien
|
// Nama penjamin pasien
|
||||||
@Column({ type: "text", nullable: false })
|
@Column({ type: "text", nullable: false })
|
||||||
guarantor_name!: string;
|
guarantor_name!: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user