/**
 * 廠商相關型別定義
 */

// 供貨商品（廠商可供應的商品）
export interface SupplyProduct {
    id: string;
    productId: string;
    productName: string;
    unit: string;
    baseUnit?: string;
    largeUnit?: string;
    conversionRate?: number;
    lastPrice?: number;
}

export interface CommonProduct {
    productId: string;
    productName: string;
    unit: string;
    lastPrice?: number;
}

export interface Supplier {
    id: string;
    name: string;
    contact?: string;
    phone?: string;
    email?: string;
    lastPurchaseDate?: string; // 上次採購日期
    commonProducts: CommonProduct[];
    supplyProducts: SupplyProduct[]; // 供貨商品列表
}

export interface SupplierFormData {
    name: string;
    contact: string;
    phone: string;
    email: string;
}

// 新增/編輯供貨商品表單
export interface SupplyProductFormData {
    productId: string;
    lastPrice?: number;
}
