
-- ----------------------------
-- 系统地区表
-- ----------------------------
drop table if exists `smart_assess`.`sys_region`;
CREATE TABLE `smart_assess`.`sys_region`  (
`id` bigint(0) NOT NULL AUTO_INCREMENT,
`name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '地区名称',
`sort` int NULL DEFAULT 0 COMMENT '排序',
`parent_id` bigint NOT NULL DEFAULT 0 COMMENT '父主键',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `index_key`(`parent_id`, `name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统地区表' ROW_FORMAT = DYNAMIC;