常量

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

_constant 表数据

学期

  • constantKey:semester

  • constantType:array

  1. [
  2. {
  3. "year": 2023,
  4. "semester": "春季"
  5. }
  6. ]

当前学期

  • 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 (1, 'semester', 'array', '学期', '[
  2. {"year": 2023, "semester": "春季"}
  3. ]', 'insert', NULL, NULL, NULL);
  4. INSERT INTO _constant (id, constantKey, constantType, desc, constantValue, operation, operationByUserId, operationByUser, operationAt) VALUES (2, 'currentSemester', 'object', '当前学期', '{"year": 2023, "semester": "春季"}', 'insert', NULL, NULL, NULL);