update: patient_guarantor.ts add faretype relation and update swagger builder

This commit is contained in:
wayanrivan
2026-03-30 09:40:20 +07:00
parent ab64ca370a
commit b00bd08565

View File

@ -7,11 +7,12 @@ import {
CreateDateColumn,
UpdateDateColumn,
DeleteDateColumn,
} from "typeorm";
import { PatientGroup } from "./patient_group"; // Import entity PatientGroup
} from "typeorm";
import { PatientGroup } from "./patient_group"; // Import entity PatientGroup
import { FareType } from "./faretype";
@Entity("patient_guarantor")
export class PatientGuarantor {
@Entity("patient_guarantor")
export class PatientGuarantor {
@PrimaryGeneratedColumn("uuid")
id!: string;
@ -48,6 +49,10 @@ import {
@JoinColumn({ name: "patient_group_id" })
patient_group!: PatientGroup;
@ManyToOne(() => FareType, { nullable: false })
@JoinColumn()
faretype!: FareType;
// Tanggal pembuatan
@CreateDateColumn()
created_at!: Date;
@ -71,4 +76,4 @@ import {
// Kolom untuk tracking siapa yang menghapus
@Column({ nullable: true, length: 256 })
deleted_by?: string;
}
}