update:relation guarantor
This commit is contained in:
@ -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 {
|
||||||
@ -59,6 +61,10 @@ export class EmrPatient {
|
|||||||
@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;
|
||||||
|
|||||||
Reference in New Issue
Block a user