/**
 * 产品数据模型接口定义
 * 作者: 阿瑞
 * 功能: 定义产品数据结构
 * 版本: 1.0
 */
import { IBrand } from './IBrand'
import { ISupplier } from './ISupplier'
/**
 * 产品成本接口
 */
export interface IProductCost {
  cost_price?: number;
  packaging_fee?: number;
  shipping_fee?: number;
}

/**
 * 产品信息接口
 */
export interface IProduct {
  id?: number;
  supplier_id?: number;
  supplier?: ISupplier;
  brand_id?: number;
  brand?: IBrand;
  category_id?: number;
  name: string;
  description?: string;
  code?: string;
  image?: string;
  sku?: string;
  aliases?: string[];
  level?: string;
  cost?: IProductCost;
  price: number;
  stock?: number;
  logistics_status?: string;
  logistics_details?: string;
  tracking_number?: string;
  created_at?: string;
  updated_at?: string;
}

/**
 * 产品列表项接口
 */
export interface IProductListItem {
  id: number;
  name: string;
  code?: string;
  sku?: string;
  price: number;
  stock: number;
  supplier_name?: string;
  brand_name?: string;
  category_name?: string;
  image?: string;
}

/**
 * 订单产品项接口，用于销售记录和售后记录中
 */
export interface IOrderProductItem {
  id?: number;
  product_id: number;
  product?: IProductListItem;
  quantity: number;
  price?: number;
} 