/**
 * Mock数据 - 商品管理
 */

// 商品状态枚举
export enum ProductStatus {
  ACTIVE = 1,     // 在售
  INACTIVE = 0,   // 下架
  OUT_OF_STOCK = 2 // 缺货
}

// 商品状态文字映射
export const ProductStatusText: Record<number, string> = {
  [ProductStatus.ACTIVE]: '在售',
  [ProductStatus.INACTIVE]: '已下架',
  [ProductStatus.OUT_OF_STOCK]: '缺货'
};

// 商品状态颜色映射
export const ProductStatusColor: Record<number, string> = {
  [ProductStatus.ACTIVE]: '#52c41a',
  [ProductStatus.INACTIVE]: '#999999',
  [ProductStatus.OUT_OF_STOCK]: '#ff4d4f'
};

// 商品分类
export const mockProductCategories = [
  { id: 1, name: '饮料', count: 45 },
  { id: 2, name: '零食', count: 38 },
  { id: 3, name: '方便食品', count: 22 },
  { id: 4, name: '日用品', count: 15 }
];

// 商品列表Mock数据
export const mockProductList = [
  {
    id: 1,
    name: '可口可乐',
    category: '饮料',
    image: '',
    price: 350,
    costPrice: 200,
    status: ProductStatus.ACTIVE,
    totalStock: 1256,
    todaySales: 48,
    monthSales: 1256,
    createdAt: '2025-10-01 10:00:00'
  },
  {
    id: 2,
    name: '矿泉水',
    category: '饮料',
    image: '',
    price: 200,
    costPrice: 80,
    status: ProductStatus.ACTIVE,
    totalStock: 2340,
    todaySales: 65,
    monthSales: 1890,
    createdAt: '2025-10-01 10:00:00'
  },
  {
    id: 3,
    name: '薯片',
    category: '零食',
    image: '',
    price: 680,
    costPrice: 420,
    status: ProductStatus.ACTIVE,
    totalStock: 568,
    todaySales: 23,
    monthSales: 789,
    createdAt: '2025-10-05 10:00:00'
  },
  {
    id: 4,
    name: '巧克力',
    category: '零食',
    image: '',
    price: 980,
    costPrice: 650,
    status: ProductStatus.ACTIVE,
    totalStock: 320,
    todaySales: 15,
    monthSales: 456,
    createdAt: '2025-10-10 10:00:00'
  },
  {
    id: 5,
    name: '方便面',
    category: '方便食品',
    image: '',
    price: 580,
    costPrice: 350,
    status: ProductStatus.OUT_OF_STOCK,
    totalStock: 0,
    todaySales: 0,
    monthSales: 678,
    createdAt: '2025-09-15 10:00:00'
  },
  {
    id: 6,
    name: '饼干',
    category: '零食',
    image: '',
    price: 450,
    costPrice: 280,
    status: ProductStatus.ACTIVE,
    totalStock: 890,
    todaySales: 18,
    monthSales: 534,
    createdAt: '2025-11-01 10:00:00'
  },
  {
    id: 7,
    name: '牛奶',
    category: '饮料',
    image: '',
    price: 390,
    costPrice: 250,
    status: ProductStatus.ACTIVE,
    totalStock: 456,
    todaySales: 28,
    monthSales: 823,
    createdAt: '2025-12-01 10:00:00'
  },
  {
    id: 8,
    name: '口香糖',
    category: '零食',
    image: '',
    price: 150,
    costPrice: 80,
    status: ProductStatus.INACTIVE,
    totalStock: 120,
    todaySales: 0,
    monthSales: 156,
    createdAt: '2025-10-20 10:00:00'
  }
];
