export const mockUser = {
  id: 1,
  username: 'testuser',
  nickname: 'Test User',
  email: 'test@example.com',
  phone: '13800138000',
  avatar: 'https://example.com/avatar.jpg',
  roles: ['admin'],
  permissions: ['user:view', 'user:create', 'user:edit', 'user:delete'],
}

export const mockRole = {
  id: 1,
  roleName: '测试角色',
  roleKey: 'test_role',
  roleSort: 1,
  status: '1',
  remark: '测试角色备注',
  createTime: new Date().toISOString(),
  updateTime: new Date().toISOString(),
}

export const mockMenu = {
  id: 1,
  menuName: '系统管理',
  parentId: 0,
  orderNum: 1,
  menuType: 'M',
  component: 'system',
  perms: 'system:view',
  status: '1',
  createTime: new Date().toISOString(),
  updateTime: new Date().toISOString(),
}

export const mockDict = {
  id: 1,
  dictName: '用户状态',
  dictType: 'user_status',
  status: '1',
  remark: '用户状态字典',
  createTime: new Date().toISOString(),
  updateTime: new Date().toISOString(),
}

export const mockConfig = {
  id: 1,
  configName: '系统名称',
  configKey: 'sys.name',
  configValue: 'Novalon管理系统',
  configType: 'Y',
  status: '1',
  remark: '系统名称配置',
  createTime: new Date().toISOString(),
  updateTime: new Date().toISOString(),
}

export const mockNotice = {
  id: 1,
  noticeTitle: '系统通知',
  noticeType: '1',
  noticeContent: '这是一条测试通知',
  status: '0',
  createTime: new Date().toISOString(),
  updateTime: new Date().toISOString(),
}

export const mockLoginRequest = {
  username: 'admin',
  password: 'admin123',
}

export const mockLoginResponse = {
  token: 'mock-jwt-token',
  user: mockUser,
}

export const mockApiResponse = <T>(data: T, code = 200, message = 'success') => ({
  code,
  message,
  data,
})

export const mockErrorResponse = (code = 500, message = 'Internal Server Error') => ({
  code,
  message,
  data: null,
})
