upd
This commit is contained in:
@ -10,7 +10,6 @@ import {
|
||||
Index,
|
||||
} from "typeorm";
|
||||
import { EmrPatient } from "../emr/emr_patient";
|
||||
import { HealthcareFacility } from "./healthcare_facility";
|
||||
import { CardInventoryStatus } from "../../types/card_inventory_status";
|
||||
|
||||
@Entity({ schema: "card_management", name: "card_inventory" })
|
||||
@ -36,9 +35,8 @@ export class CardInventory {
|
||||
@Column({ nullable: true, length: 128 })
|
||||
tag_id: string;
|
||||
|
||||
@ManyToOne(() => HealthcareFacility, { onDelete: "NO ACTION", nullable: true })
|
||||
@JoinColumn()
|
||||
facility: HealthcareFacility;
|
||||
@Column({ nullable: true, length: 64 })
|
||||
facility_code: string;
|
||||
|
||||
@Column({
|
||||
type: "enum",
|
||||
|
||||
@ -1,56 +0,0 @@
|
||||
import {
|
||||
Entity,
|
||||
PrimaryGeneratedColumn,
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
UpdateDateColumn,
|
||||
DeleteDateColumn,
|
||||
ManyToOne,
|
||||
JoinColumn,
|
||||
Index,
|
||||
} from "typeorm";
|
||||
import { Munisipo } from "../munisipo";
|
||||
import { Administrativu } from "../administrativu";
|
||||
|
||||
/** Minimal cache — synced from external master; no local type/status enums */
|
||||
@Entity({ schema: "card_management", name: "healthcare_facility" })
|
||||
@Index(["code"], { unique: true })
|
||||
export class HealthcareFacility {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@Column({ nullable: false, length: 64, unique: true })
|
||||
code: string;
|
||||
|
||||
@Column({ type: "text", nullable: false })
|
||||
name: string;
|
||||
|
||||
@ManyToOne(() => Munisipo, { onDelete: "NO ACTION", nullable: true })
|
||||
@JoinColumn()
|
||||
municipio: Munisipo;
|
||||
|
||||
@ManyToOne(() => Administrativu, { onDelete: "NO ACTION", nullable: true })
|
||||
@JoinColumn()
|
||||
administrativu: Administrativu;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@Column({ nullable: true, length: 256 })
|
||||
created_by: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
@UpdateDateColumn()
|
||||
updated_at: Date;
|
||||
|
||||
@Column({ nullable: true, length: 256 })
|
||||
updated_by: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
@DeleteDateColumn()
|
||||
deleted_at: Date;
|
||||
|
||||
@Column({ nullable: true, length: 256 })
|
||||
deleted_by: string;
|
||||
}
|
||||
@ -1,5 +1,4 @@
|
||||
export * from "../types/card_inventory_status";
|
||||
export * from "../entity/card-management/card_inventory";
|
||||
export * from "../entity/card-management/healthcare_facility";
|
||||
export * from "../entity/card-management/running_number_log";
|
||||
export * from "../entity/card-management/card_stock_in";
|
||||
|
||||
Reference in New Issue
Block a user