import { type Base, genBase } from "./_base"
import { type Medicine, genMedicine } from "./medicine";

interface MedicinemixItem extends Base {
  id: number
  medicineMix_id: number
  medicine_id: number
  medicine: Medicine
  dose: number
  uom_code: string
}

export interface CreateDto {
  medicineMix_id: number
  medicine_id: number
  medicine: Medicine
  dose: number
  uom_code: string
}

export interface GetListDto {
  page: number
  size: number
}

export interface GetDetailDto {
  id: number
}

export interface UpdateDto extends CreateDto {
  id: number
}

export interface DeleteDto {
  id: number
}

export function MedicinemixItem(): MedicinemixItem {
  return {
    ...genBase(),
    medicineMix_id: 0,
    medicine_id: 0,
    medicine: genMedicine(),
    dose: 0,
    uom_code: ''
  }
}
