SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for hs_sys_number_rule
-- ----------------------------
DROP TABLE IF EXISTS `hs_sys_number_rule`;
CREATE TABLE `hs_sys_number_rule`  (
  `rule_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '规则id',
  `rule_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '规则名称',
  `part_one_id` int(11) NULL DEFAULT NULL COMMENT '编号第一部分规则id',
  `part_one_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编号第一部分规则名称',
  `part_one_length` int(11) NULL DEFAULT NULL COMMENT '编号第一部分长度',
  `part_two_id` int(11) NULL DEFAULT NULL COMMENT '编号第二部分规则id',
  `part_two_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编号第二部分规则名称',
  `part_two_length` int(11) NULL DEFAULT NULL COMMENT '编号第二部分长度',
  `part_two_value` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编号第二部分(当前值,默认值)',
  `part_three_id` int(11) NULL DEFAULT NULL COMMENT '编号第三部分规则id',
  `part_three_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编号第三部分规则名称',
  `part_three_length` int(11) NULL DEFAULT NULL COMMENT '编号第三部分长度',
  `part_three_value` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编号第三部分(当前值,默认值)',
  `jgid` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '机构id',
  `qybz` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '启用标志 0-启用 1-禁用',
  `is_delete` int(1) NULL DEFAULT 0 COMMENT '是否删除（0.未删除；1.已删除）',
  `create_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者',
  `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
  `update_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '修改者',
  `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
  `remark` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`rule_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '编号规则' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;