update: patient_guarantor.ts add faretype relation and update swagger builder
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user