import { mockDate } from '../index'

export interface ExchangeItem {
  id: string; name: string; description?: string; points: number
  stock: number; cover?: string; status: number; sort: number
  createdAt: string; updatedAt: string
}

export interface ExchangeOrder {
  id: string; itemId: string; itemName?: string; userId: string; userName?: string
  points: number; status: number; address?: string
  createdAt: string; updatedAt: string
}

export const mockExchangeItems: ExchangeItem[] = [
  { id: '1', name: '精美花盆', description: '陶瓷手绘花盆', points: 200, stock: 50, cover: 'https://picsum.photos/seed/pot/300/200', status: 1, sort: 0, createdAt: mockDate(30), updatedAt: mockDate(1) },
  { id: '2', name: '园艺工具套装', description: '5件套园艺工具', points: 500, stock: 20, cover: 'https://picsum.photos/seed/tools/300/200', status: 1, sort: 1, createdAt: mockDate(25), updatedAt: mockDate(1) },
  { id: '3', name: '有机肥料', description: '通用型有机肥 1kg', points: 100, stock: 100, cover: 'https://picsum.photos/seed/fertilizer/300/200', status: 1, sort: 2, createdAt: mockDate(20), updatedAt: mockDate(1) },
]

export const mockExchangeOrders: ExchangeOrder[] = [
  { id: '1', itemId: '1', itemName: '精美花盆', userId: '2', userName: '张三', points: 200, status: 1, address: '北京市朝阳区xxx', createdAt: mockDate(5), updatedAt: mockDate(1) },
  { id: '2', itemId: '2', itemName: '园艺工具套装', userId: '3', userName: '李四', points: 500, status: 2, address: '上海市浦东新区xxx', createdAt: mockDate(3), updatedAt: mockDate(1) },
  { id: '3', itemId: '3', itemName: '有机肥料', userId: '4', userName: '王五', points: 100, status: 0, createdAt: mockDate(1), updatedAt: mockDate(0) },
]
