常量

12138

常量总览

_constant结构

  1. CREATE TABLE `_constant` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `constantKey` varchar(255) DEFAULT NULL,
  4. `constantType` varchar(255) DEFAULT NULL COMMENT '常量类型; object, array',
  5. `desc` varchar(255) DEFAULT NULL COMMENT '描述',
  6. `constantValue` text COMMENT '常量内容; object, array',
  7. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  8. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  9. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  10. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  11. PRIMARY KEY (`id`) USING BTREE
  12. ) ENGINE = InnoDB AUTO_INCREMENT = 3 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = DYNAMIC COMMENT = '常量表; 软删除未启用;'

_constant 表数据

任务优先级

constantKey constantType
taskLevel array
  1. [
  2. {
  3. "text": "无",
  4. "value": "无",
  5. "color": "grey"
  6. },
  7. {
  8. "text": "低",
  9. "value": "低",
  10. "color": "green"
  11. },
  12. {
  13. "text": "中",
  14. "value": "中",
  15. "color": "orange"
  16. },
  17. {
  18. "text": "高",
  19. "value": "高",
  20. "color": "red"
  21. }
  22. ]

任务状态

constantKey constantType
taskStatus array
  1. [
  2. {
  3. "text": "未开始",
  4. "value": "未开始",
  5. "color": "blue"
  6. },
  7. {
  8. "text": "进行中",
  9. "value": "进行中",
  10. "color": "orange"
  11. },
  12. {
  13. "text": "已完成",
  14. "value": "已完成",
  15. "color": "green"
  16. }
  17. ]

_constant语句

  1. INSERT INTO _constant (id, constantKey, constantType, desc, constantValue, operation, operationByUserId, operationByUser, operationAt) VALUES (1, 'taskLevel', 'array', '任务优先级', '[
  2. {
  3. "text": "无",
  4. "value": "无",
  5. "color": "grey"
  6. },
  7. {
  8. "text": "低",
  9. "value": "低",
  10. "color": "green"
  11. },
  12. {
  13. "text": "中",
  14. "value": "中",
  15. "color": "orange"
  16. },
  17. {
  18. "text": "高",
  19. "value": "高",
  20. "color": "red"
  21. }
  22. ]', 'update', NULL, NULL, '2023-03-07T15:17:37+08:00');
  23. INSERT INTO _constant (id, constantKey, constantType, desc, constantValue, operation, operationByUserId, operationByUser, operationAt) VALUES (2, 'taskStatus', 'array', '任务状态', '[
  24. {
  25. "text": "未开始",
  26. "value": "未开始",
  27. "color": "blue"
  28. },
  29. {
  30. "text": "进行中",
  31. "value": "进行中",
  32. "color": "orange"
  33. },
  34. {
  35. "text": "已完成",
  36. "value": "已完成",
  37. "color": "green"
  38. }
  39. ]', 'update', NULL, NULL, '2023-03-07T15:17:37+08:00');