import ISummary from '@/core/models/summary';
import { IGoodResponse } from '@/domains/pos/models/good.io';
import { TPosOrderGoodPayload } from './payload';

export interface IPosOrderItem<T = TPosOrderGoodPayload> {
  unit_price: number;
  quantity: number;
  total_amount: number;
  discount_amount: number;
  measure_unit: ISummary;
  good_id?: string;
  service_id?: string;
  notes?: string;
  image_url?: string;
  payload: T;

  base_total_amount: number;
  discount: number;
  tax_amount: number;
}

export interface IPosInOrderGood extends Omit<IPosOrderItem, 'good_id' | 'service_id' | 'notes'> {
  id: string;
  good: IGoodResponse;
}
