settings.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /**
  2. * 设置页相关类型定义
  3. */
  4. /**
  5. * 用户统计数据
  6. */
  7. export interface UserStats {
  8. /** 本月出勤天数 */
  9. thisMonthAttendance: number
  10. /** 累计出勤天数 */
  11. totalAttendance: number
  12. /** 本月薪资(元) */
  13. thisMonthSalary: number
  14. }
  15. /**
  16. * 用户信息摘要
  17. */
  18. export interface UserProfile {
  19. /** 用户ID */
  20. id: number
  21. /** 姓名 */
  22. name: string
  23. /** 残疾类型 */
  24. disabilityType: string
  25. /** 残疾等级 */
  26. disabilityLevel: string
  27. /** 用户统计数据 */
  28. stats: UserStats
  29. }
  30. /**
  31. * 登录日志
  32. */
  33. export interface LoginLog {
  34. /** 日志ID */
  35. id: number
  36. /** 登录时间 */
  37. loginTime: string
  38. /** 设备信息 */
  39. device: string
  40. /** IP地址 */
  41. ipAddress: string
  42. }
  43. /**
  44. * 菜单项类型
  45. */
  46. export interface MenuItem {
  47. /** 菜单项唯一标识 */
  48. id: string
  49. /** 菜单项标题 */
  50. title: string
  51. /** 图标类名(Heroicons) */
  52. icon: string
  53. /** 图标背景色类名 */
  54. bgColor: string
  55. /** 图标颜色类名 */
  56. iconColor: string
  57. /** 点击处理函数 */
  58. onPress: () => void
  59. }
  60. /**
  61. * 菜单分组
  62. */
  63. export interface MenuSection {
  64. /** 分组标题 */
  65. title?: string
  66. /** 菜单项列表 */
  67. items: MenuItem[]
  68. }