update: patient_guarantor.ts add faretype relation and update swagger builder
This commit is contained in:
@ -1,74 +1,79 @@
|
|||||||
import {
|
import {
|
||||||
Entity,
|
Entity,
|
||||||
PrimaryGeneratedColumn,
|
PrimaryGeneratedColumn,
|
||||||
Column,
|
Column,
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
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")
|
|
||||||
export class PatientGuarantor {
|
@Entity("patient_guarantor")
|
||||||
@PrimaryGeneratedColumn("uuid")
|
export class PatientGuarantor {
|
||||||
id!: string;
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id!: string;
|
||||||
// Nama penjamin pasien
|
|
||||||
@Column({ type: "text", nullable: false })
|
// Nama penjamin pasien
|
||||||
guarantor_name!: string;
|
@Column({ type: "text", nullable: false })
|
||||||
|
guarantor_name!: string;
|
||||||
// Nomor telepon penjamin pasien
|
|
||||||
@Column({ type: "text", nullable: false })
|
// Nomor telepon penjamin pasien
|
||||||
phone!: string;
|
@Column({ type: "text", nullable: false })
|
||||||
|
phone!: string;
|
||||||
// Provinsi tempat tinggal penjamin pasien
|
|
||||||
@Column({ type: "text", nullable: false })
|
// Provinsi tempat tinggal penjamin pasien
|
||||||
province!: string;
|
@Column({ type: "text", nullable: false })
|
||||||
|
province!: string;
|
||||||
// Kota tempat tinggal penjamin pasien
|
|
||||||
@Column({ type: "text", nullable: false })
|
// Kota tempat tinggal penjamin pasien
|
||||||
city!: string;
|
@Column({ type: "text", nullable: false })
|
||||||
|
city!: string;
|
||||||
// Kode pos tempat tinggal penjamin pasien
|
|
||||||
@Column({ type: "text", nullable: false })
|
// Kode pos tempat tinggal penjamin pasien
|
||||||
zip_code!: string;
|
@Column({ type: "text", nullable: false })
|
||||||
|
zip_code!: string;
|
||||||
// Nomor perjanjian atau kontrak
|
|
||||||
@Column({ type: "text", nullable: false })
|
// Nomor perjanjian atau kontrak
|
||||||
agreement_no!: string;
|
@Column({ type: "text", nullable: false })
|
||||||
|
agreement_no!: string;
|
||||||
// Deskripsi perjanjian atau kontrak
|
|
||||||
@Column({ type: "text", nullable: true })
|
// Deskripsi perjanjian atau kontrak
|
||||||
agreement_desc?: string;
|
@Column({ type: "text", nullable: true })
|
||||||
|
agreement_desc?: string;
|
||||||
// Relasi ke PatientGroup, setiap penjamin dapat terhubung dengan satu grup pasien
|
|
||||||
@ManyToOne(() => PatientGroup, { nullable: false })
|
// Relasi ke PatientGroup, setiap penjamin dapat terhubung dengan satu grup pasien
|
||||||
@JoinColumn({ name: "patient_group_id" })
|
@ManyToOne(() => PatientGroup, { nullable: false })
|
||||||
patient_group!: PatientGroup;
|
@JoinColumn({ name: "patient_group_id" })
|
||||||
|
patient_group!: PatientGroup;
|
||||||
// Tanggal pembuatan
|
|
||||||
@CreateDateColumn()
|
@ManyToOne(() => FareType, { nullable: false })
|
||||||
created_at!: Date;
|
@JoinColumn()
|
||||||
|
faretype!: FareType;
|
||||||
// Kolom untuk tracking siapa yang membuat
|
|
||||||
@Column({ nullable: true, length: 256 })
|
// Tanggal pembuatan
|
||||||
created_by?: string;
|
@CreateDateColumn()
|
||||||
|
created_at!: Date;
|
||||||
// Tanggal pembaruan
|
|
||||||
@UpdateDateColumn({ nullable: true })
|
// Kolom untuk tracking siapa yang membuat
|
||||||
updated_at?: Date;
|
@Column({ nullable: true, length: 256 })
|
||||||
|
created_by?: string;
|
||||||
// Kolom untuk tracking siapa yang memperbarui
|
|
||||||
@Column({ nullable: true, length: 256 })
|
// Tanggal pembaruan
|
||||||
updated_by?: string;
|
@UpdateDateColumn({ nullable: true })
|
||||||
|
updated_at?: Date;
|
||||||
// Tanggal penghapusan
|
|
||||||
@DeleteDateColumn({ nullable: true })
|
// Kolom untuk tracking siapa yang memperbarui
|
||||||
deleted_at?: Date;
|
@Column({ nullable: true, length: 256 })
|
||||||
|
updated_by?: string;
|
||||||
// Kolom untuk tracking siapa yang menghapus
|
|
||||||
@Column({ nullable: true, length: 256 })
|
// Tanggal penghapusan
|
||||||
deleted_by?: string;
|
@DeleteDateColumn({ nullable: true })
|
||||||
}
|
deleted_at?: Date;
|
||||||
|
|
||||||
|
// Kolom untuk tracking siapa yang menghapus
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
deleted_by?: string;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user