常量

12114

常量总览

_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 = 8 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '常量表; 软删除未启用;'

_constant 表数据

报销类别

  • constantKey:reimbursementType

  • constantType:array

  1. [
  2. "差旅",
  3. "交通",
  4. "餐饮",
  5. "通信",
  6. "办公",
  7. "培训",
  8. "医疗",
  9. "其他"
  10. ]

发布状态

  • constantKey:publishStatus

  • constantType:array

  1. [
  2. {
  3. "value": "draft",
  4. "text": "草稿"
  5. },
  6. {
  7. "value": "publish",
  8. "text": "已发布"
  9. }
  10. ]

报销状态

  • constantKey:reimbursementStatus

  • constantType:array

  1. [
  2. "处理中",
  3. "已完成",
  4. "已撤销"
  5. ]

审核状态

  • constantKey:reviewStatus

  • constantType:array

  1. [
  2. "待审核",
  3. "审核中",
  4. "审核通过",
  5. "驳回"
  6. ]

转账状态

  • constantKey:transferStatus

  • constantType:array

  1. [
  2. "待转账",
  3. "已转账",
  4. "异常"
  5. ]

当前年学期

  • constantKey:currentSemester

  • constantType:object

  1. {
  2. "year": 2023,
  3. "semester": "春季"
  4. }

_constant语句

  1. INSERT INTO _constant (id, constantKey, constantType, desc, constantValue, operation, operationByUserId, operationByUser, operationAt) VALUES (2, 'reimbursementType', 'array', '报销类别', '["差旅", "交通", "餐饮", "通信", "办公", "培训", "医疗", "其他"]', 'insert', NULL, NULL, NULL);
  2. INSERT INTO _constant (id, constantKey, constantType, desc, constantValue, operation, operationByUserId, operationByUser, operationAt) VALUES (3, 'publishStatus', 'array', '发布状态', '[{"value":"draft","text":"草稿"},{"value": "publish","text": "已发布"}]', 'insert', NULL, NULL, NULL);
  3. INSERT INTO _constant (id, constantKey, constantType, desc, constantValue, operation, operationByUserId, operationByUser, operationAt) VALUES (4, 'reimbursementStatus', 'array', '报销状态', '["处理中", "已完成", "已撤销"]', 'insert', NULL, NULL, NULL);
  4. INSERT INTO _constant (id, constantKey, constantType, desc, constantValue, operation, operationByUserId, operationByUser, operationAt) VALUES (5, 'reviewStatus', 'array', '审核状态', '["待审核", "审核中", "审核通过", "驳回"]', 'insert', NULL, NULL, NULL);
  5. INSERT INTO _constant (id, constantKey, constantType, desc, constantValue, operation, operationByUserId, operationByUser, operationAt) VALUES (6, 'transferStatus', 'array', '转账状态', '["待转账", "已转账", "异常"]', 'insert', NULL, NULL, NULL);
  6. INSERT INTO _constant (id, constantKey, constantType, desc, constantValue, operation, operationByUserId, operationByUser, operationAt) VALUES (7, 'currentSemester', 'object', '当前年学期', '{"year": 2023, "semester": "春季"}', 'insert', NULL, NULL, NULL);