import { BaseCoreEntity } from 'src/core/modules/domain/entities/base-core.entity';

export interface TransactionItemEntity extends BaseCoreEntity {
  // item detail
  item_id: string;
  item_name: string;
  item_type: string;
  item_price: number;
  item_hpp: number;
  item_category_id: string;
  item_category_name: string;
  item_bundlings: string;
  qr_image_url: string;

  // item tenant data
  item_tenant_id: string;
  item_tenant_name: string;
  item_tenant_share_margin: number;

  // calculation data
  total_price: number;
  total_net_price: number;
  discount_value: number;
  total_hpp: number;
  total_profit: number;
  total_share_tenant: number;
  qty: number;
  qty_remaining: number;
  taxes: string;
  bundling_items?: TransactionBundlingItemEntity[];
}

export interface TransactionBundlingItemEntity extends BaseCoreEntity {
  item_id: string;
  item_name: string;
  hpp: number;
  total_net_price: number;
  discount_value: number;
  base_price: number;
  item_rates: number;
  total_price?: number;
}
