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