feat(opd): add appointment id col
This commit is contained in:
@ -8,6 +8,7 @@ import {
|
||||
ManyToOne,
|
||||
OneToOne,
|
||||
JoinColumn,
|
||||
OneToMany,
|
||||
} from "typeorm";
|
||||
|
||||
import { EmrRegistration } from "./emr_registration";
|
||||
@ -38,12 +39,10 @@ export class EmrRegistrationOutpatient {
|
||||
@JoinColumn()
|
||||
doctor: User;
|
||||
|
||||
/** Jika user pilih dari jadwal dokter, link ke slot tersebut */
|
||||
@ManyToOne(() => DoctorSchedule, { onDelete: "SET NULL", nullable: true })
|
||||
@JoinColumn()
|
||||
doctor_schedule: DoctorSchedule | null;
|
||||
|
||||
/** Contoh: "08:00-12:00" atau "Pagi" */
|
||||
@Column({ nullable: true, length: 64 })
|
||||
practice_hour: string;
|
||||
|
||||
@ -62,6 +61,10 @@ export class EmrRegistrationOutpatient {
|
||||
@Column({ nullable: true, length: 256 })
|
||||
registration_number: string;
|
||||
|
||||
@ManyToOne(() => EmrRegistrationOutpatient, { onDelete: "SET NULL", nullable: true })
|
||||
@JoinColumn()
|
||||
appointment_id: EmrRegistrationOutpatient | null;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
Reference in New Issue
Block a user