add entity pharmacy master-data
This commit is contained in:
62
src/entity/pharmacy/factory.ts
Normal file
62
src/entity/pharmacy/factory.ts
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
import {
|
||||||
|
Entity,
|
||||||
|
PrimaryGeneratedColumn,
|
||||||
|
Column,
|
||||||
|
CreateDateColumn,
|
||||||
|
UpdateDateColumn,
|
||||||
|
DeleteDateColumn,
|
||||||
|
} from "typeorm";
|
||||||
|
|
||||||
|
@Entity("factory")
|
||||||
|
export class Factory {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id!: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
factory_name!: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
address?: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
web?: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
phone?: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
email?: string;
|
||||||
|
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at!: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
created_by?: string;
|
||||||
|
|
||||||
|
@UpdateDateColumn({ nullable: true })
|
||||||
|
updated_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
updated_by?: string;
|
||||||
|
|
||||||
|
@DeleteDateColumn({ nullable: true })
|
||||||
|
deleted_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
deleted_by?: string;
|
||||||
|
}
|
||||||
45
src/entity/pharmacy/factory_to_supplier.ts
Normal file
45
src/entity/pharmacy/factory_to_supplier.ts
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
import {
|
||||||
|
Entity,
|
||||||
|
PrimaryGeneratedColumn,
|
||||||
|
ManyToOne,
|
||||||
|
JoinColumn,
|
||||||
|
CreateDateColumn,
|
||||||
|
UpdateDateColumn,
|
||||||
|
DeleteDateColumn,
|
||||||
|
Column,
|
||||||
|
} from "typeorm";
|
||||||
|
|
||||||
|
import { Factory } from "./factory";
|
||||||
|
import { Supplier } from "./supplier";
|
||||||
|
|
||||||
|
@Entity("factory_to_supplier")
|
||||||
|
export class FactoryToSupplier {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id!: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => Factory, { nullable: false })
|
||||||
|
@JoinColumn({ name: "factory_id" })
|
||||||
|
factory!: Factory;
|
||||||
|
|
||||||
|
@ManyToOne(() => Supplier, { nullable: false })
|
||||||
|
@JoinColumn({ name: "supplier_id" })
|
||||||
|
supplier!: Supplier;
|
||||||
|
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at!: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
created_by?: string;
|
||||||
|
|
||||||
|
@UpdateDateColumn({ nullable: true })
|
||||||
|
updated_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
updated_by?: string;
|
||||||
|
|
||||||
|
@DeleteDateColumn({ nullable: true })
|
||||||
|
deleted_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
deleted_by?: string;
|
||||||
|
}
|
||||||
38
src/entity/pharmacy/generic_name.ts
Normal file
38
src/entity/pharmacy/generic_name.ts
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
import {
|
||||||
|
Entity,
|
||||||
|
PrimaryGeneratedColumn,
|
||||||
|
Column,
|
||||||
|
CreateDateColumn,
|
||||||
|
UpdateDateColumn,
|
||||||
|
DeleteDateColumn,
|
||||||
|
} from "typeorm";
|
||||||
|
|
||||||
|
@Entity("generic_name")
|
||||||
|
export class GenericName {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id!: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
generic_name!: string;
|
||||||
|
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at!: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
created_by?: string;
|
||||||
|
|
||||||
|
@UpdateDateColumn({ nullable: true })
|
||||||
|
updated_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
updated_by?: string;
|
||||||
|
|
||||||
|
@DeleteDateColumn({ nullable: true })
|
||||||
|
deleted_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
deleted_by?: string;
|
||||||
|
}
|
||||||
38
src/entity/pharmacy/item_category.ts
Normal file
38
src/entity/pharmacy/item_category.ts
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
import {
|
||||||
|
Entity,
|
||||||
|
PrimaryGeneratedColumn,
|
||||||
|
Column,
|
||||||
|
CreateDateColumn,
|
||||||
|
UpdateDateColumn,
|
||||||
|
DeleteDateColumn,
|
||||||
|
} from "typeorm";
|
||||||
|
|
||||||
|
@Entity("item_category")
|
||||||
|
export class ItemCategory {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id!: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
category_name!: string;
|
||||||
|
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at!: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
created_by?: string;
|
||||||
|
|
||||||
|
@UpdateDateColumn({ nullable: true })
|
||||||
|
updated_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
updated_by?: string;
|
||||||
|
|
||||||
|
@DeleteDateColumn({ nullable: true })
|
||||||
|
deleted_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
deleted_by?: string;
|
||||||
|
}
|
||||||
38
src/entity/pharmacy/item_class.ts
Normal file
38
src/entity/pharmacy/item_class.ts
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
import {
|
||||||
|
Entity,
|
||||||
|
PrimaryGeneratedColumn,
|
||||||
|
Column,
|
||||||
|
CreateDateColumn,
|
||||||
|
UpdateDateColumn,
|
||||||
|
DeleteDateColumn,
|
||||||
|
} from "typeorm";
|
||||||
|
|
||||||
|
@Entity("item_class")
|
||||||
|
export class ItemClass {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id!: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
item_class_name!: string;
|
||||||
|
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at!: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
created_by?: string;
|
||||||
|
|
||||||
|
@UpdateDateColumn({ nullable: true })
|
||||||
|
updated_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
updated_by?: string;
|
||||||
|
|
||||||
|
@DeleteDateColumn({ nullable: true })
|
||||||
|
deleted_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
deleted_by?: string;
|
||||||
|
}
|
||||||
46
src/entity/pharmacy/item_class_detail.ts
Normal file
46
src/entity/pharmacy/item_class_detail.ts
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
import {
|
||||||
|
Entity,
|
||||||
|
PrimaryGeneratedColumn,
|
||||||
|
Column,
|
||||||
|
CreateDateColumn,
|
||||||
|
UpdateDateColumn,
|
||||||
|
DeleteDateColumn,
|
||||||
|
ManyToOne,
|
||||||
|
JoinColumn,
|
||||||
|
} from "typeorm";
|
||||||
|
|
||||||
|
import { ItemClass } from "./item_class";
|
||||||
|
|
||||||
|
@Entity("item_class_detail")
|
||||||
|
export class ItemClassDetail {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id!: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
class_detail_name!: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => ItemClass, { nullable: false })
|
||||||
|
@JoinColumn({ name: "item_class_id" })
|
||||||
|
item_class!: ItemClass;
|
||||||
|
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at!: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
created_by?: string;
|
||||||
|
|
||||||
|
@UpdateDateColumn({ nullable: true })
|
||||||
|
updated_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
updated_by?: string;
|
||||||
|
|
||||||
|
@DeleteDateColumn({ nullable: true })
|
||||||
|
deleted_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
deleted_by?: string;
|
||||||
|
}
|
||||||
38
src/entity/pharmacy/item_group.ts
Normal file
38
src/entity/pharmacy/item_group.ts
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
import {
|
||||||
|
Entity,
|
||||||
|
PrimaryGeneratedColumn,
|
||||||
|
Column,
|
||||||
|
CreateDateColumn,
|
||||||
|
UpdateDateColumn,
|
||||||
|
DeleteDateColumn,
|
||||||
|
} from "typeorm";
|
||||||
|
|
||||||
|
@Entity("item_group")
|
||||||
|
export class ItemGroup {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id!: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
group_name!: string;
|
||||||
|
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at!: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
created_by?: string;
|
||||||
|
|
||||||
|
@UpdateDateColumn({ nullable: true })
|
||||||
|
updated_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
updated_by?: string;
|
||||||
|
|
||||||
|
@DeleteDateColumn({ nullable: true })
|
||||||
|
deleted_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
deleted_by?: string;
|
||||||
|
}
|
||||||
115
src/entity/pharmacy/item_master.ts
Normal file
115
src/entity/pharmacy/item_master.ts
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
import {
|
||||||
|
Entity,
|
||||||
|
PrimaryGeneratedColumn,
|
||||||
|
Column,
|
||||||
|
CreateDateColumn,
|
||||||
|
UpdateDateColumn,
|
||||||
|
DeleteDateColumn,
|
||||||
|
ManyToOne,
|
||||||
|
JoinColumn,
|
||||||
|
} from "typeorm";
|
||||||
|
|
||||||
|
import { GenericName } from "./generic_name";
|
||||||
|
import { ItemTypeDetail } from "./item_type_detail";
|
||||||
|
import { ItemCategory } from "./item_category";
|
||||||
|
import { ItemClass } from "./item_class";
|
||||||
|
import { ItemClassDetail } from "./item_class_detail";
|
||||||
|
import { ItemStatus } from "./item_status";
|
||||||
|
import { Factory } from "./factory";
|
||||||
|
import { Unit } from "./unit";
|
||||||
|
|
||||||
|
@Entity("item_master")
|
||||||
|
export class ItemMaster {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id!: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
item_name!: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => GenericName, { nullable: false })
|
||||||
|
@JoinColumn({ name: "generic_name_id" })
|
||||||
|
generic_name!: GenericName;
|
||||||
|
|
||||||
|
@ManyToOne(() => ItemTypeDetail, { nullable: false })
|
||||||
|
@JoinColumn({ name: "item_type_detail_id" })
|
||||||
|
type_detail!: ItemTypeDetail;
|
||||||
|
|
||||||
|
@ManyToOne(() => ItemCategory, { nullable: false })
|
||||||
|
@JoinColumn({ name: "item_category_id" })
|
||||||
|
category!: ItemCategory;
|
||||||
|
|
||||||
|
@ManyToOne(() => ItemClass, { nullable: false })
|
||||||
|
@JoinColumn({ name: "item_class_id" })
|
||||||
|
item_class!: ItemClass;
|
||||||
|
|
||||||
|
@ManyToOne(() => ItemClassDetail, { nullable: false })
|
||||||
|
@JoinColumn({ name: "item_class_detail_id" })
|
||||||
|
class_detail!: ItemClassDetail;
|
||||||
|
|
||||||
|
@ManyToOne(() => ItemStatus, { nullable: false })
|
||||||
|
@JoinColumn({ name: "item_status_id" })
|
||||||
|
status!: ItemStatus;
|
||||||
|
|
||||||
|
@ManyToOne(() => Factory, { nullable: false })
|
||||||
|
@JoinColumn({ name: "factory_id" })
|
||||||
|
factory!: Factory;
|
||||||
|
|
||||||
|
@ManyToOne(() => Unit, { nullable: false })
|
||||||
|
@JoinColumn({ name: "large_unit_id" })
|
||||||
|
large_unit!: Unit;
|
||||||
|
|
||||||
|
@ManyToOne(() => Unit, { nullable: false })
|
||||||
|
@JoinColumn({ name: "small_unit_id" })
|
||||||
|
small_unit!: Unit;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "int",
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
minimum_quantity?: number;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "int",
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
minimum_sales_quantity?: number;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "int",
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
pack_size?: number;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "int",
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
strength?: number;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "boolean",
|
||||||
|
default: true,
|
||||||
|
})
|
||||||
|
active!: boolean;
|
||||||
|
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at!: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
created_by?: string;
|
||||||
|
|
||||||
|
@UpdateDateColumn({ nullable: true })
|
||||||
|
updated_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
updated_by?: string;
|
||||||
|
|
||||||
|
@DeleteDateColumn({ nullable: true })
|
||||||
|
deleted_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
deleted_by?: string;
|
||||||
|
}
|
||||||
57
src/entity/pharmacy/item_origin.ts
Normal file
57
src/entity/pharmacy/item_origin.ts
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
import {
|
||||||
|
Entity,
|
||||||
|
PrimaryGeneratedColumn,
|
||||||
|
Column,
|
||||||
|
CreateDateColumn,
|
||||||
|
UpdateDateColumn,
|
||||||
|
DeleteDateColumn,
|
||||||
|
} from "typeorm";
|
||||||
|
|
||||||
|
@Entity("item_origin")
|
||||||
|
export class ItemOrigin {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id!: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
origin_name!: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
origin_description?: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: false,
|
||||||
|
default: "pharmacy",
|
||||||
|
})
|
||||||
|
department!: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
account?: string;
|
||||||
|
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at!: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
created_by?: string;
|
||||||
|
|
||||||
|
@UpdateDateColumn({ nullable: true })
|
||||||
|
updated_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
updated_by?: string;
|
||||||
|
|
||||||
|
@DeleteDateColumn({ nullable: true })
|
||||||
|
deleted_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
deleted_by?: string;
|
||||||
|
}
|
||||||
38
src/entity/pharmacy/item_status.ts
Normal file
38
src/entity/pharmacy/item_status.ts
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
import {
|
||||||
|
Entity,
|
||||||
|
PrimaryGeneratedColumn,
|
||||||
|
Column,
|
||||||
|
CreateDateColumn,
|
||||||
|
UpdateDateColumn,
|
||||||
|
DeleteDateColumn,
|
||||||
|
} from "typeorm";
|
||||||
|
|
||||||
|
@Entity("item_status")
|
||||||
|
export class ItemStatus {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id!: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
status_name!: string;
|
||||||
|
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at!: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
created_by?: string;
|
||||||
|
|
||||||
|
@UpdateDateColumn({ nullable: true })
|
||||||
|
updated_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
updated_by?: string;
|
||||||
|
|
||||||
|
@DeleteDateColumn({ nullable: true })
|
||||||
|
deleted_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
deleted_by?: string;
|
||||||
|
}
|
||||||
46
src/entity/pharmacy/item_type.ts
Normal file
46
src/entity/pharmacy/item_type.ts
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
import {
|
||||||
|
Entity,
|
||||||
|
PrimaryGeneratedColumn,
|
||||||
|
Column,
|
||||||
|
CreateDateColumn,
|
||||||
|
UpdateDateColumn,
|
||||||
|
DeleteDateColumn,
|
||||||
|
ManyToOne,
|
||||||
|
JoinColumn,
|
||||||
|
} from "typeorm";
|
||||||
|
|
||||||
|
import { ItemGroup } from "./item_group";
|
||||||
|
|
||||||
|
@Entity("item_type")
|
||||||
|
export class ItemType {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id!: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
type_name!: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => ItemGroup, { nullable: false })
|
||||||
|
@JoinColumn({ name: "item_group_id" })
|
||||||
|
item_group!: ItemGroup;
|
||||||
|
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at!: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
created_by?: string;
|
||||||
|
|
||||||
|
@UpdateDateColumn({ nullable: true })
|
||||||
|
updated_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
updated_by?: string;
|
||||||
|
|
||||||
|
@DeleteDateColumn({ nullable: true })
|
||||||
|
deleted_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
deleted_by?: string;
|
||||||
|
}
|
||||||
46
src/entity/pharmacy/item_type_detail.ts
Normal file
46
src/entity/pharmacy/item_type_detail.ts
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
import {
|
||||||
|
Entity,
|
||||||
|
PrimaryGeneratedColumn,
|
||||||
|
Column,
|
||||||
|
CreateDateColumn,
|
||||||
|
UpdateDateColumn,
|
||||||
|
DeleteDateColumn,
|
||||||
|
ManyToOne,
|
||||||
|
JoinColumn,
|
||||||
|
} from "typeorm";
|
||||||
|
|
||||||
|
import { ItemType } from "./item_type";
|
||||||
|
|
||||||
|
@Entity("item_type_detail")
|
||||||
|
export class ItemTypeDetail {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id!: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
type_detail_name!: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => ItemType, { nullable: false })
|
||||||
|
@JoinColumn({ name: "item_type_id" })
|
||||||
|
item_type!: ItemType;
|
||||||
|
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at!: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
created_by?: string;
|
||||||
|
|
||||||
|
@UpdateDateColumn({ nullable: true })
|
||||||
|
updated_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
updated_by?: string;
|
||||||
|
|
||||||
|
@DeleteDateColumn({ nullable: true })
|
||||||
|
deleted_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
deleted_by?: string;
|
||||||
|
}
|
||||||
56
src/entity/pharmacy/supplier.ts
Normal file
56
src/entity/pharmacy/supplier.ts
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
import {
|
||||||
|
Entity,
|
||||||
|
PrimaryGeneratedColumn,
|
||||||
|
Column,
|
||||||
|
CreateDateColumn,
|
||||||
|
UpdateDateColumn,
|
||||||
|
DeleteDateColumn,
|
||||||
|
} from "typeorm";
|
||||||
|
|
||||||
|
@Entity("supplier")
|
||||||
|
export class Supplier {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id!: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
supplier_name!: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
address?: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
phone?: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
email?: string;
|
||||||
|
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at!: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
created_by?: string;
|
||||||
|
|
||||||
|
@UpdateDateColumn({ nullable: true })
|
||||||
|
updated_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
updated_by?: string;
|
||||||
|
|
||||||
|
@DeleteDateColumn({ nullable: true })
|
||||||
|
deleted_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
deleted_by?: string;
|
||||||
|
}
|
||||||
38
src/entity/pharmacy/unit.ts
Normal file
38
src/entity/pharmacy/unit.ts
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
import {
|
||||||
|
Entity,
|
||||||
|
PrimaryGeneratedColumn,
|
||||||
|
Column,
|
||||||
|
CreateDateColumn,
|
||||||
|
UpdateDateColumn,
|
||||||
|
DeleteDateColumn,
|
||||||
|
} from "typeorm";
|
||||||
|
|
||||||
|
@Entity("unit")
|
||||||
|
export class Unit {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id!: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
unit_name!: string;
|
||||||
|
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at!: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
created_by?: string;
|
||||||
|
|
||||||
|
@UpdateDateColumn({ nullable: true })
|
||||||
|
updated_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
updated_by?: string;
|
||||||
|
|
||||||
|
@DeleteDateColumn({ nullable: true })
|
||||||
|
deleted_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
deleted_by?: string;
|
||||||
|
}
|
||||||
44
src/entity/pharmacy/usage_instructions.ts
Normal file
44
src/entity/pharmacy/usage_instructions.ts
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import {
|
||||||
|
Entity,
|
||||||
|
PrimaryGeneratedColumn,
|
||||||
|
Column,
|
||||||
|
CreateDateColumn,
|
||||||
|
UpdateDateColumn,
|
||||||
|
DeleteDateColumn,
|
||||||
|
} from "typeorm";
|
||||||
|
|
||||||
|
@Entity("usage_instructions")
|
||||||
|
export class UsageInstructions {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id!: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
usage_instructions_name!: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
usage_abbreviation?: string;
|
||||||
|
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at!: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
created_by?: string;
|
||||||
|
|
||||||
|
@UpdateDateColumn({ nullable: true })
|
||||||
|
updated_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
updated_by?: string;
|
||||||
|
|
||||||
|
@DeleteDateColumn({ nullable: true })
|
||||||
|
deleted_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
deleted_by?: string;
|
||||||
|
}
|
||||||
44
src/entity/pharmacy/usage_time.ts
Normal file
44
src/entity/pharmacy/usage_time.ts
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import {
|
||||||
|
Entity,
|
||||||
|
PrimaryGeneratedColumn,
|
||||||
|
Column,
|
||||||
|
CreateDateColumn,
|
||||||
|
UpdateDateColumn,
|
||||||
|
DeleteDateColumn,
|
||||||
|
} from "typeorm";
|
||||||
|
|
||||||
|
@Entity("usage_time")
|
||||||
|
export class UsageTime {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id!: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
usage_time_name!: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "text",
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
usage_time_abbreviation?: string;
|
||||||
|
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at!: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
created_by?: string;
|
||||||
|
|
||||||
|
@UpdateDateColumn({ nullable: true })
|
||||||
|
updated_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
updated_by?: string;
|
||||||
|
|
||||||
|
@DeleteDateColumn({ nullable: true })
|
||||||
|
deleted_at?: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
deleted_by?: string;
|
||||||
|
}
|
||||||
@ -3,3 +3,4 @@ export * from "./schema/hrms";
|
|||||||
export * from "./schema/emr";
|
export * from "./schema/emr";
|
||||||
export * from "./schema/finances";
|
export * from "./schema/finances";
|
||||||
export * from "./schema/procurement";
|
export * from "./schema/procurement";
|
||||||
|
export * from "./schema/pharmacy"
|
||||||
|
|||||||
16
src/schema/pharmacy.ts
Normal file
16
src/schema/pharmacy.ts
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
export * from "../entity/pharmacy/item_group";
|
||||||
|
export * from "../entity/pharmacy/item_origin";
|
||||||
|
export * from "../entity/pharmacy/item_type";
|
||||||
|
export * from "../entity/pharmacy/item_type_detail";
|
||||||
|
export * from "../entity/pharmacy/unit";
|
||||||
|
export * from "../entity/pharmacy/item_category";
|
||||||
|
export * from "../entity/pharmacy/item_status";
|
||||||
|
export * from "../entity/pharmacy/usage_instructions";
|
||||||
|
export * from "../entity/pharmacy/usage_time";
|
||||||
|
export * from "../entity/pharmacy/item_class";
|
||||||
|
export * from "../entity/pharmacy/item_class_detail";
|
||||||
|
export * from "../entity/pharmacy/generic_name";
|
||||||
|
export * from "../entity/pharmacy/factory";
|
||||||
|
export * from "../entity/pharmacy/supplier";
|
||||||
|
export * from "../entity/pharmacy/factory_to_supplier";
|
||||||
|
export * from "../entity/pharmacy/item_master";
|
||||||
Reference in New Issue
Block a user