update:relation guarantor

This commit is contained in:
wayanrivan
2026-03-09 12:15:31 +07:00
parent 24a31d727b
commit e911dcc652

View File

@ -7,6 +7,7 @@ import {
DeleteDateColumn,
ManyToOne,
JoinColumn,
OneToMany,
} from "typeorm";
import { Status } from "../../types/status";
@ -14,6 +15,7 @@ import { Aldeia } from "../aldeia";
import { Suco } from "../suco";
import { Administrativu } from "../administrativu";
import { Munisipo } from "../munisipo";
import { PatientGuarantor } from "../patient_guarantor";
@Entity("emr_patients", { schema: "emr" })
export class EmrPatient {
@ -53,12 +55,16 @@ export class EmrPatient {
@Column({ nullable: true, length: 256 })
place_of_birth: string;
@Column({ nullable: true, type: "text" })
@Column({ nullable: true, type: "text" })
photo: string;
@Column({ type: "text", nullable: true })
address: string;
@ManyToOne(() => PatientGuarantor, { onDelete: "NO ACTION" })
@JoinColumn()
guarantor: PatientGuarantor;
@ManyToOne(() => Munisipo, { onDelete: "NO ACTION" })
@JoinColumn()
munisipio: Munisipo;