feat(medicine): modify entry-form, create handler and service
This commit is contained in:
+13
-25
@@ -4,30 +4,21 @@ export interface MedicineBase {
|
||||
}
|
||||
|
||||
export interface Medicine {
|
||||
id: string
|
||||
name: string
|
||||
code: string
|
||||
name: string
|
||||
medicineGroup_code: string
|
||||
medicineMethod_code: string
|
||||
uom_code: string
|
||||
type: string
|
||||
dose: string
|
||||
infra_id: string
|
||||
stock: string
|
||||
status: string
|
||||
infra_id?: string | null
|
||||
stock: number
|
||||
}
|
||||
|
||||
export interface CreateDto {
|
||||
name: string
|
||||
code: string
|
||||
medicineGroup_code: string
|
||||
medicineMethod_code: string
|
||||
uom_code: string
|
||||
type: string
|
||||
dose: string
|
||||
infra_id: string
|
||||
stock: string
|
||||
status: string
|
||||
export interface CreateMedicineDto extends Medicine {
|
||||
|
||||
}
|
||||
|
||||
export interface UpdateMedicineDto extends CreateMedicineDto {
|
||||
id: string | number
|
||||
}
|
||||
|
||||
export interface GetListDto {
|
||||
@@ -49,7 +40,7 @@ export interface GetDetailDto {
|
||||
id?: string
|
||||
}
|
||||
|
||||
export interface UpdateDto extends CreateDto {
|
||||
export interface UpdateDto extends CreateMedicineDto {
|
||||
id?: number
|
||||
}
|
||||
|
||||
@@ -57,17 +48,14 @@ export interface DeleteDto {
|
||||
id?: string
|
||||
}
|
||||
|
||||
export function genMedicine(): CreateDto {
|
||||
export function genMedicine(): CreateMedicineDto {
|
||||
return {
|
||||
name: 'name',
|
||||
code: 'code',
|
||||
medicineGroup_code: 'medicineGroup_code',
|
||||
medicineMethod_code: 'medicineMethod_code',
|
||||
uom_code: 'uom_code',
|
||||
type: 'type',
|
||||
dose: 'dose',
|
||||
infra_id: 'infra_id',
|
||||
stock: 'stock',
|
||||
status: 'status',
|
||||
infra_id: null,
|
||||
stock: 0
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user