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