dye-schema.sql 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*
  2. Navicat Premium Data Transfer
  3. Source Server : 127.0.0.1
  4. Source Server Type : MySQL
  5. Source Server Version : 50717
  6. Source Host : 127.0.0.1:3306
  7. Source Schema : calendar-center
  8. Target Server Type : MySQL
  9. Target Server Version : 50717
  10. File Encoding : 65001
  11. Date: 29/10/2021 14:01:04
  12. */
  13. SET NAMES utf8mb4;
  14. SET
  15. FOREIGN_KEY_CHECKS = 0;
  16. -- ----------------------------
  17. -- Table structure for dye_basic
  18. -- ----------------------------
  19. DROP TABLE IF EXISTS `dye_basic`;
  20. CREATE TABLE `dye_basic`
  21. (
  22. `id` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  23. `type_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '染色类型编码,对应rwd_def_funcid的type字段',
  24. `type_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '染色类型名称',
  25. `season_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '季节编码',
  26. `season_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '季节名称',
  27. `create_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  28. `update_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  29. `update_user_id` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '最后创建人ID',
  30. `is_delete` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '是否删除(0:否 1:是)',
  31. PRIMARY KEY (`id`) USING BTREE
  32. ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '染色基础表' ROW_FORMAT = Dynamic;
  33. SET NAMES utf8mb4;
  34. SET
  35. FOREIGN_KEY_CHECKS = 0;
  36. -- ----------------------------
  37. -- Table structure for dye_rule_custom
  38. -- ----------------------------
  39. DROP TABLE IF EXISTS `dye_rule_custom`;
  40. CREATE TABLE `dye_rule_custom`
  41. (
  42. `id` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  43. `basic_id` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '基础表ID',
  44. `group_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '集团编码',
  45. `project_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目ID',
  46. `upper_limit` int(50) NOT NULL COMMENT '上限',
  47. `upper_symbol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '上限符号',
  48. `lower_limit` int(50) NOT NULL COMMENT '下限',
  49. `lower_symbol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '下限符号',
  50. `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名称',
  51. `color_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '色值',
  52. `create_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  53. `update_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改时间',
  54. `update_user_id` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '最后修改人ID',
  55. `is_delete` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '是否删除(0:否 1:是)',
  56. `order_num` int(10) NULL DEFAULT NULL COMMENT '排序',
  57. `num_symbol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数值单位符号',
  58. PRIMARY KEY (`id`) USING BTREE,
  59. UNIQUE INDEX `id`(`id`) USING BTREE COMMENT '主键索引',
  60. INDEX `basic_id`(`basic_id`) USING BTREE COMMENT '外键索引',
  61. CONSTRAINT `fk_custom` FOREIGN KEY (`basic_id`) REFERENCES `dye_basic` (`id`) ON DELETE RESTRICT ON UPDATE NO ACTION
  62. ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '染色规则自定义表' ROW_FORMAT = Dynamic;
  63. SET NAMES utf8mb4;
  64. SET
  65. FOREIGN_KEY_CHECKS = 0;
  66. -- ----------------------------
  67. -- Table structure for dye_rule_default
  68. -- ----------------------------
  69. DROP TABLE IF EXISTS `dye_rule_default`;
  70. CREATE TABLE `dye_rule_default`
  71. (
  72. `id` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
  73. `basic_id` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '染色基础表ID',
  74. `upper_limit` int(50) NOT NULL COMMENT '上限',
  75. `upper_symbol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '上限符号',
  76. `lower_limit` int(50) NOT NULL COMMENT '下限',
  77. `lower_symbol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '下限符号',
  78. `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名称',
  79. `color_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '色值',
  80. `create_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  81. `update_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  82. `update_user_id` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '最后更新人ID',
  83. `is_delete` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '是否删除(0:否 1:是)',
  84. `order_num` int(10) NULL DEFAULT NULL COMMENT '排序',
  85. `num_symbol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数值单位符号',
  86. PRIMARY KEY (`id`) USING BTREE,
  87. UNIQUE INDEX `id`(`id`) USING BTREE COMMENT '主键索引',
  88. INDEX `basic_id`(`basic_id`) USING BTREE COMMENT '外键索引',
  89. CONSTRAINT `fk_default` FOREIGN KEY (`basic_id`) REFERENCES `dye_basic` (`id`) ON DELETE RESTRICT ON UPDATE NO ACTION
  90. ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '默认染色规则' ROW_FORMAT = Dynamic;