workbench.uts 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. /**
  2. * 工作台模块类型定义
  3. */
  4. // 列表项
  5. export type WorkItem = {
  6. id: number
  7. title: string
  8. description: string
  9. status: 'pending' | 'processing' | 'completed'
  10. createTime: number
  11. updateTime: number
  12. creator: string
  13. }
  14. // 列表查询参数
  15. export type WorkListParams = {
  16. page: number
  17. pageSize: number
  18. keyword?: string
  19. status?: string
  20. startTime?: number
  21. endTime?: number
  22. }
  23. // 分页响应
  24. export type PageResult<T> = {
  25. list: T[]
  26. total: number
  27. page: number
  28. pageSize: number
  29. hasMore: boolean
  30. }
  31. // 表单数据
  32. export type FormData = {
  33. title: string
  34. description: string
  35. category: string
  36. amount: number | null
  37. date: number | null
  38. files: FileItem[]
  39. images: string[]
  40. videos: VideoItem[]
  41. }
  42. // 文件项
  43. export type FileItem = {
  44. name: string
  45. url: string
  46. size: number
  47. type: string
  48. }
  49. // 视频项(包含上传响应信息和视频元数据)
  50. export type VideoItem = {
  51. url: string
  52. fileId: string
  53. fileName: string
  54. filePath: string
  55. fileSize: number
  56. fileExt: string
  57. businessType: string
  58. thumbnail: string
  59. duration: number
  60. }
  61. // 上传文件信息
  62. export type UploadFileInfo = {
  63. fileId: string
  64. fileName: string
  65. filePath: string
  66. fileExt: string
  67. fileSize: number
  68. fileType: string | null
  69. createTime: string
  70. createBy: string
  71. downloadCount: number
  72. businessType: string
  73. isDeleted: number
  74. }
  75. // 上传响应
  76. export type UploadResponse = {
  77. url: string
  78. fileId: string
  79. fileName: string
  80. filePath: string
  81. fileSize: number
  82. fileExt: string
  83. businessType: string
  84. }
  85. // 承包商信息
  86. export type ContractorInfo = {
  87. id: string
  88. createBy: string
  89. createTime: string
  90. updateBy: string | null
  91. updateTime: string | null
  92. isDeleted: number
  93. remark: string
  94. creditCode: string
  95. contractorName: string
  96. companyAddress: string
  97. legalRepresentative: string
  98. contactPhone: string
  99. qualificationLevel: string
  100. qualificationCertNo: string
  101. businessScope: string
  102. bankName: string
  103. bankAccount: string
  104. }
  105. // 承包商列表响应
  106. export type ContractorListResponse = {
  107. code: number
  108. msg: string | null
  109. total: number
  110. data: ContractorInfo[]
  111. success: boolean
  112. }