update: patient_guarantor.ts add faretype relation and update swagger builder
This commit is contained in:
@ -7,11 +7,12 @@ import {
|
|||||||
CreateDateColumn,
|
CreateDateColumn,
|
||||||
UpdateDateColumn,
|
UpdateDateColumn,
|
||||||
DeleteDateColumn,
|
DeleteDateColumn,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { PatientGroup } from "./patient_group"; // Import entity PatientGroup
|
import { PatientGroup } from "./patient_group"; // Import entity PatientGroup
|
||||||
|
import { FareType } from "./faretype";
|
||||||
|
|
||||||
@Entity("patient_guarantor")
|
@Entity("patient_guarantor")
|
||||||
export class PatientGuarantor {
|
export class PatientGuarantor {
|
||||||
@PrimaryGeneratedColumn("uuid")
|
@PrimaryGeneratedColumn("uuid")
|
||||||
id!: string;
|
id!: string;
|
||||||
|
|
||||||
@ -48,6 +49,10 @@ import {
|
|||||||
@JoinColumn({ name: "patient_group_id" })
|
@JoinColumn({ name: "patient_group_id" })
|
||||||
patient_group!: PatientGroup;
|
patient_group!: PatientGroup;
|
||||||
|
|
||||||
|
@ManyToOne(() => FareType, { nullable: false })
|
||||||
|
@JoinColumn()
|
||||||
|
faretype!: FareType;
|
||||||
|
|
||||||
// Tanggal pembuatan
|
// Tanggal pembuatan
|
||||||
@CreateDateColumn()
|
@CreateDateColumn()
|
||||||
created_at!: Date;
|
created_at!: Date;
|
||||||
@ -71,4 +76,4 @@ import {
|
|||||||
// Kolom untuk tracking siapa yang menghapus
|
// Kolom untuk tracking siapa yang menghapus
|
||||||
@Column({ nullable: true, length: 256 })
|
@Column({ nullable: true, length: 256 })
|
||||||
deleted_by?: string;
|
deleted_by?: string;
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user