import { mockDate } from '../index'

export interface Topic {
  id: string; title: string; description?: string; sort: number; status: number
  postCount: number; createdAt: string; updatedAt: string
}

export interface Post {
  id: string; topicId: string; topicTitle?: string; userId: string; userName?: string
  title: string; content: string; likeCount: number; commentCount: number
  status: number; createdAt: string; updatedAt: string
}

export const mockTopics: Topic[] = [
  { id: '1', title: '养花心得', description: '分享你的养花经验', sort: 0, status: 1, postCount: 28, createdAt: mockDate(60), updatedAt: mockDate(1) },
  { id: '2', title: '植物鉴定', description: '帮你识别未知植物', sort: 1, status: 1, postCount: 15, createdAt: mockDate(50), updatedAt: mockDate(2) },
  { id: '3', title: '病虫害防治', description: '植物健康问题讨论', sort: 2, status: 1, postCount: 22, createdAt: mockDate(40), updatedAt: mockDate(1) },
]

export const mockPosts: Post[] = [
  { id: '1', topicId: '1', topicTitle: '养花心得', userId: '2', userName: '张三', title: '我的阳台花园改造', content: '经过三个月的改造...', likeCount: 42, commentCount: 12, status: 1, createdAt: mockDate(10), updatedAt: mockDate(1) },
  { id: '2', topicId: '2', topicTitle: '植物鉴定', userId: '3', userName: '李四', title: '这是什么花？', content: '路边看到的一种花...', likeCount: 8, commentCount: 5, status: 1, createdAt: mockDate(7), updatedAt: mockDate(1) },
  { id: '3', topicId: '3', topicTitle: '病虫害防治', userId: '4', userName: '王五', title: '绿萝叶子发黄怎么办', content: '最近发现绿萝叶子...', likeCount: 35, commentCount: 18, status: 1, createdAt: mockDate(5), updatedAt: mockDate(1) },
  { id: '4', topicId: '1', topicTitle: '养花心得', userId: '5', userName: '赵六', title: '新手第一次养多肉', content: '刚入坑的多肉小白...', likeCount: 20, commentCount: 8, status: 0, createdAt: mockDate(3), updatedAt: mockDate(1) },
]
