import type { ShopGoods, ShopGoodsSku } from '@/api/shop/shopGoods/model'
import type { ShopGoodsCategory } from '@/api/shop/shopGoodsCategory/model'

export type { ShopGoods, ShopGoodsSku, ShopGoodsCategory }

/** 商品列表项 (简化版，用于列表展示) */
export interface ProductListItem {
  goodsId: number
  name: string
  image: string
  price: string
  salePrice: string
  stock: number
  sales?: number
  isNew?: number
}

/** 商品详情 (包含完整 SKU 和规格) */
export type ProductDetail = ShopGoods

/** 规格选择状态 */
export interface SpecSelection {
  specId: number
  specValueId: number
}

/** 购物车商品项 */
export interface CartItem {
  id?: number
  goodsId: number
  skuId?: number
  quantity: number
  product?: ShopGoods
  sku?: ShopGoodsSku
  checked?: boolean
}
