dye-schema.sql 7.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. `group_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '集团编码',
  24. `project_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目ID',
  25. `type_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '染色类型编码,对应rwd_def_funcid的type字段',
  26. `type_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '染色类型名称',
  27. `season_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '季节编码',
  28. `season_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '季节名称',
  29. `create_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  30. `update_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  31. `update_user_id` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '最后创建人ID',
  32. `is_delete` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '是否删除(0:否 1:是)',
  33. PRIMARY KEY (`id`) USING BTREE
  34. ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '染色基础表' ROW_FORMAT = Dynamic;
  35. SET NAMES utf8mb4;
  36. SET FOREIGN_KEY_CHECKS = 0;
  37. -- ----------------------------
  38. -- Table structure for dye_rule_custom
  39. -- ----------------------------
  40. DROP TABLE IF EXISTS `dye_rule_custom`;
  41. CREATE TABLE `dye_rule_custom` (
  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. `upper_limit` int(50) NOT NULL COMMENT '上限',
  45. `upper_symbol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '上限符号',
  46. `lower_limit` int(50) NOT NULL COMMENT '下限',
  47. `lower_symbol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '下限符号',
  48. `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名称',
  49. `color_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '色值',
  50. `create_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  51. `update_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改时间',
  52. `update_user_id` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '最后修改人ID',
  53. `is_delete` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '是否删除(0:否 1:是)',
  54. `order_num` int(10) NULL DEFAULT NULL COMMENT '排序',
  55. `num_symbol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数值单位符号',
  56. PRIMARY KEY (`id`) USING BTREE,
  57. UNIQUE INDEX `id`(`id`) USING BTREE COMMENT '主键索引',
  58. INDEX `basic_id`(`basic_id`) USING BTREE COMMENT '外键索引',
  59. CONSTRAINT `fk_custom` FOREIGN KEY (`basic_id`) REFERENCES `dye_basic` (`id`) ON DELETE RESTRICT ON UPDATE NO ACTION
  60. ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '染色规则自定义表' ROW_FORMAT = Dynamic;
  61. SET NAMES utf8mb4;
  62. SET FOREIGN_KEY_CHECKS = 0;
  63. -- ----------------------------
  64. -- Table structure for dye_rule_default
  65. -- ----------------------------
  66. DROP TABLE IF EXISTS `dye_rule_default`;
  67. CREATE TABLE `dye_rule_default` (
  68. `id` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
  69. `basic_id` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '染色基础表ID',
  70. `upper_limit` int(50) NOT NULL COMMENT '上限',
  71. `upper_symbol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '上限符号',
  72. `lower_limit` int(50) NOT NULL COMMENT '下限',
  73. `lower_symbol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '下限符号',
  74. `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名称',
  75. `color_value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '色值',
  76. `create_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',
  77. `update_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  78. `update_user_id` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '最后更新人ID',
  79. `is_delete` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '是否删除(0:否 1:是)',
  80. `order_num` int(10) NULL DEFAULT NULL COMMENT '排序',
  81. `num_symbol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数值单位符号',
  82. PRIMARY KEY (`id`) USING BTREE,
  83. UNIQUE INDEX `id`(`id`) USING BTREE COMMENT '主键索引',
  84. INDEX `basic_id`(`basic_id`) USING BTREE COMMENT '外键索引',
  85. CONSTRAINT `fk_default` FOREIGN KEY (`basic_id`) REFERENCES `dye_basic` (`id`) ON DELETE RESTRICT ON UPDATE NO ACTION
  86. ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '默认染色规则' ROW_FORMAT = Dynamic;