feat(room): add new column of specialist form
This commit is contained in:
@ -8,6 +8,7 @@ import { ServiceClass } from "./service_class";
|
||||
import { OneToMany } from "typeorm";
|
||||
import { MedicalForm } from "./medical_form";
|
||||
import { JoinTable } from "typeorm";
|
||||
import { SpecialistForm } from "../types/specialist_form";
|
||||
|
||||
@Entity("rooms")
|
||||
export class Room {
|
||||
@ -69,13 +70,8 @@ export class Room {
|
||||
@ManyToMany(() => Service, (service) => service.rooms)
|
||||
services: Service[];
|
||||
|
||||
@ManyToMany(() => MedicalForm, { onDelete: "CASCADE" })
|
||||
@JoinTable({
|
||||
name: "room_medical_forms",
|
||||
joinColumn: { name: "room_id" },
|
||||
inverseJoinColumn: { name: "medical_form_id" },
|
||||
})
|
||||
medical_forms: MedicalForm[];
|
||||
@Column
|
||||
specialist_form: SpecialistForm
|
||||
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@ -67,3 +67,4 @@ export * from "../types/role";
|
||||
export * from "../types/status";
|
||||
export * from "../types/email";
|
||||
export * from "../types/telegram";
|
||||
export * from "../types/specialist_form";
|
||||
|
||||
17
src/types/specialist_form.ts
Normal file
17
src/types/specialist_form.ts
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Workflow kategori form khusus poli.
|
||||
* DENTAL: poli gigi
|
||||
* CARDIOLOGY: poli jantung
|
||||
* DERMATOLOGY: poli kulit dan kelamin
|
||||
* GYNECOLOGY: poli kebidanan dan kandungan
|
||||
* ORTHOPEDICS: poli orthopedi
|
||||
* NEUROLOGY: poli neurologi
|
||||
*/
|
||||
export enum SpecialistForm {
|
||||
DENTAL = 'dental',
|
||||
CARDIOLOGY = 'cardiology',
|
||||
DERMATOLOGY = 'dermatology',
|
||||
GYNECOLOGY = 'gynecology',
|
||||
ORTHOPEDICS = 'orthopedics',
|
||||
NEUROLOGY = 'neurology',
|
||||
}
|
||||
Reference in New Issue
Block a user