text: -- ----------------------------
  -- Table structure for sms
  -- ----------------------------
  CREATE TABLE `sms`  (
    `sms_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    `bo_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
    `bo_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '0' COMMENT '0，运营录入;1,联系人导入，2,报名信息导入',
    `create_date` date DEFAULT NULL,
    `create_time` datetime(0) DEFAULT NULL,
    `mobile` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
    `content` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
    `send_st_time` datetime(0) DEFAULT NULL,
    `send_ed_time` datetime(0) DEFAULT NULL,
    `send_time` datetime(0) DEFAULT NULL,
    `is_send_end` tinyint(4) DEFAULT -1,
    `send_cnt` tinyint(4) DEFAULT 0,
    `send_memo` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
    `corp_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
    PRIMARY KEY (`sms_id`) USING BTREE,
    INDEX `bo_id`(`bo_id`) USING BTREE
  );
  
  -- ----------------------------
  -- Table structure for sys_area
  -- ----------------------------
  CREATE TABLE `sys_area`  (
    `area_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '区域编码',
    `parent_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '父级编号',
    `parent_codes` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '所有父级编号',
    `tree_sort` decimal(10, 0) NOT NULL COMMENT '本级排序号（升序）',
    `tree_sorts` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '所有级别排序号',
    `tree_leaf` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '是否最末级',
    `tree_level` decimal(4, 0) NOT NULL COMMENT '层次级别',
    `tree_names` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '全节点名',
    `area_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '区域名称',
    `area_type` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '区域类型',
    `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '状态（0正常 1删除 2停用）',
    `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '创建者',
    `create_date` datetime(0) NOT NULL COMMENT '创建时间',
    `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '更新者',
    `update_date` datetime(0) NOT NULL COMMENT '更新时间',
    `remarks` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注信息',
    PRIMARY KEY (`area_code`) USING BTREE,
    INDEX `idx_sys_area_pc`(`parent_code`) USING BTREE,
    INDEX `idx_sys_area_ts`(`tree_sort`) USING BTREE,
    INDEX `idx_sys_area_status`(`status`) USING BTREE
  );
  
  -- ----------------------------
  -- Table structure for sys_config
  -- ----------------------------
  CREATE TABLE `sys_config`  (
    `id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '编号',
    `config_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '名称',
    `config_key` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '参数键',
    `config_value` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '参数值',
    `is_sys` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '系统内置（1是 0否）',
    `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建者',
    `create_date` datetime(0) DEFAULT NULL COMMENT '创建时间',
    `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '更新者',
    `update_date` datetime(0) DEFAULT NULL COMMENT '更新时间',
    `remarks` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注信息',
    PRIMARY KEY (`id`) USING BTREE,
    INDEX `idx_sys_config_key`(`config_key`) USING BTREE
  );
  
  
  -- ----------------------------
  -- Table structure for sys_dict_data
  -- ----------------------------
  CREATE TABLE `sys_dict_data`  (
    `dict_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '字典编码',
    `parent_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '父级编号',
    `parent_codes` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '所有父级编号',
    `tree_sort` decimal(10, 0) DEFAULT NULL COMMENT '本级排序号（升序）',
    `tree_sorts` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '所有级别排序号',
    `tree_leaf` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '是否最末级',
    `tree_level` decimal(4, 0) DEFAULT NULL COMMENT '层次级别',
    `tree_names` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '全节点名',
    `dict_label` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '字典标签',
    `dict_value` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '字典键值',
    `dict_type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '字典类型',
    `is_sys` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '系统内置（1是 0否）',
    `description` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '字典描述',
    `css_style` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'css样式（如：color:red)',
    `css_class` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'css类名（如：red）',
    `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '0' COMMENT '状态（0正常 1删除 2停用）',
    `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建者',
    `create_date` datetime(0) DEFAULT NULL COMMENT '创建时间',
    `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '更新者',
    `update_date` datetime(0) DEFAULT NULL COMMENT '更新时间',
    `remarks` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注信息',
    `corp_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '0' COMMENT '租户代码',
    `corp_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'JeeSite' COMMENT '租户名称',
    PRIMARY KEY (`dict_code`) USING BTREE,
    INDEX `idx_sys_dict_data_cc`(`corp_code`) USING BTREE,
    INDEX `idx_sys_dict_data_dt`(`dict_type`) USING BTREE,
    INDEX `idx_sys_dict_data_pc`(`parent_code`) USING BTREE,
    INDEX `idx_sys_dict_data_status`(`status`) USING BTREE,
    INDEX `idx_sys_dict_data_ts`(`tree_sort`) USING BTREE,
    INDEX `idx_sys_dict_data_dv`(`dict_value`) USING BTREE
  );
  
  -- ----------------------------
  -- Table structure for sys_dict_type
  -- ----------------------------
  CREATE TABLE `sys_dict_type`  (
    `id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '编号',
    `dict_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '字典名称',
    `dict_type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '字典类型',
    `is_sys` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '是否系统字典',
    `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '状态（0正常 1删除 2停用）',
    `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '创建者',
    `create_date` datetime(0) NOT NULL COMMENT '创建时间',
    `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '更新者',
    `update_date` datetime(0) NOT NULL COMMENT '更新时间',
    `remarks` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注信息',
    PRIMARY KEY (`id`) USING BTREE,
    INDEX `idx_sys_dict_type_is`(`is_sys`) USING BTREE,
    INDEX `idx_sys_dict_type_status`(`status`) USING BTREE
  );
  
  -- ----------------------------
  -- Table structure for sys_file
  -- ----------------------------
  CREATE TABLE `sys_file`  (
    `file_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '编号',
    `bo_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '外键，通用编号',
    `bo_type` varchar(8) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '0' COMMENT '附件的业务类型。默认0,0，无；1 主办方，2,用户头像;',
    `file_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '文件名',
    `file_ext` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '扩展名',
    `file_path` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '文件URL',
    `file_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '文件类型',
    `file_size` int(10) UNSIGNED DEFAULT 0,
    `is_step` tinyint(4) DEFAULT 0 COMMENT '是否是step:0,否；1，是',
    `is_thumb` tinyint(4) DEFAULT 0,
    `is_step_support` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '0' COMMENT '0：初始，1：支持，2：不支持',
    `result_msg` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
    `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
    `create_date` datetime(0) DEFAULT NULL,
    `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '更新者',
    `update_date` datetime(0) DEFAULT NULL COMMENT '更新时间',
    `remarks` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注信息',
    `corp_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '租户代码',
    `corp_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '租户名称',
    PRIMARY KEY (`file_id`) USING BTREE
  );
  
  -- ----------------------------
  -- Table structure for sys_menu
  -- ----------------------------
  CREATE TABLE `sys_menu`  (
    `menu_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '菜单编码',
    `parent_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '父级编号',
    `parent_codes` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '所有父级编号',
    `tree_sort` decimal(10, 0) DEFAULT NULL COMMENT '本级排序号（升序）',
    `tree_sorts` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '所有级别排序号',
    `tree_leaf` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '是否最末级',
    `tree_level` decimal(4, 0) DEFAULT NULL COMMENT '层次级别',
    `tree_names` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '全节点名',
    `menu_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '菜单名称',
    `menu_type` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '菜单类型（1菜单 2权限 3开发）',
    `menu_href` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '链接',
    `menu_target` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '目标',
    `menu_icon` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '图标',
    `menu_color` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '颜色',
    `permission` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '权限标识',
    `weight` decimal(4, 0) DEFAULT NULL COMMENT '菜单权重',
    `is_show` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '是否显示（1显示 0隐藏）',
    `sys_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '归属系统（default:主导航菜单、mobileApp:APP菜单）',
    `module_codes` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '归属模块（多个用逗号隔开）',
    `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '0' COMMENT '状态（0正常 1删除 2停用）',
    `is_built` tinyint(4) DEFAULT 0 COMMENT '是否系统内置',
    `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建者',
    `create_date` datetime(0) DEFAULT NULL COMMENT '创建时间',
    `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '更新者',
    `update_date` datetime(0) DEFAULT NULL COMMENT '更新时间',
    `remarks` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注信息',
    PRIMARY KEY (`menu_code`) USING BTREE,
    INDEX `idx_sys_menu_pc`(`parent_code`) USING BTREE
  );
  
  
  -- ----------------------------
  -- Table structure for sys_module
  -- ----------------------------
  CREATE TABLE `sys_module`  (
    `module_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '模块编码',
    `module_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '模块名称',
    `description` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '模块描述',
    `main_class_name` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '主类全名',
    `current_version` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '当前版本',
    `upgrade_info` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '升级信息',
    `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '状态（0正常 1删除 2停用）',
    `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '创建者',
    `create_date` datetime(0) NOT NULL COMMENT '创建时间',
    `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '更新者',
    `update_date` datetime(0) NOT NULL COMMENT '更新时间',
    `remarks` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注信息',
    PRIMARY KEY (`module_code`) USING BTREE,
    INDEX `idx_sys_module_status`(`status`) USING BTREE
  );
  
  -- ----------------------------
  -- Table structure for sys_msg_inner
  -- ----------------------------
  CREATE TABLE `sys_msg_inner`  (
    `id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '编号',
    `msg_title` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '消息标题',
    `content_level` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '1' COMMENT '内容级别（1普通 2一般 3紧急）',
    `content_type` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '1' COMMENT '内容类型（1公告 2新闻 3会议  4系统 5其它）',
    `msg_content` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '消息内容',
    `receive_type` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '1' COMMENT '接受者类型（1用户 2部门 3角色 4岗位）',
    `receive_codes` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '接受者字符串',
    `receive_names` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '接受者名称字符串',
    `send_user_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '发送者用户编码',
    `send_user_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '发送者用户姓名',
    `send_date` datetime(0) DEFAULT NULL COMMENT '发送时间',
    `is_attac` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '0' COMMENT '是否有附件',
    `notify_types` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '通知类型（PC APP 短信 邮件 微信）多选',
    `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '状态（0正常 1删除 4审核 5驳回 9草稿）',
    `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建者',
    `create_date` datetime(0) DEFAULT NULL COMMENT '创建时间',
    `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '更新者',
    `update_date` datetime(0) DEFAULT NULL COMMENT '更新时间',
    `remarks` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注信息',
    PRIMARY KEY (`id`) USING BTREE,
    INDEX `idx_sys_msg_inner_cb`(`create_by`) USING BTREE,
    INDEX `idx_sys_msg_inner_status`(`status`) USING BTREE,
    INDEX `idx_sys_msg_inner_cl`(`content_level`) USING BTREE,
    INDEX `idx_sys_msg_inner_sc`(`send_user_code`) USING BTREE,
    INDEX `idx_sys_msg_inner_sd`(`send_date`) USING BTREE
  );
  
  -- ----------------------------
  -- Table structure for sys_msg_inner_record
  -- ----------------------------
  CREATE TABLE `sys_msg_inner_record`  (
    `id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '编号',
    `msg_inner_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '所属消息',
    `receive_user_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '接受者用户编码',
    `receive_user_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '接受者用户姓名',
    `read_status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '1' COMMENT '读取状态（0未送达 1未读 2已读）',
    `read_date` datetime(0) DEFAULT NULL COMMENT '阅读时间',
    `create_date` datetime(0) DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    `is_star` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '是否标星',
    `is_push` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '0' COMMENT '是否推送',
    PRIMARY KEY (`id`) USING BTREE,
    INDEX `idx_sys_msg_inner_r_mi`(`msg_inner_id`) USING BTREE,
    INDEX `idx_sys_msg_inner_r_rc`(`receive_user_code`) USING BTREE
  );
  
  -- ----------------------------
  -- Table structure for sys_org
  -- ----------------------------
  CREATE TABLE `sys_org`  (
    `org_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '机构编码',
    `parent_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '0' COMMENT '父级编号',
    `parent_codes` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '所有父级编号',
    `tree_sort` decimal(10, 0) DEFAULT NULL COMMENT '本级排序号（升序）',
    `tree_sorts` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '所有级别排序号',
    `tree_leaf` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '是否最末级',
    `tree_level` decimal(4, 0) DEFAULT NULL COMMENT '层次级别',
    `tree_names` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '全节点名',
    `view_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '机构代码',
    `org_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '机构名称',
    `full_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '机构全称',
    `org_type` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '机构类型',
    `leader` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '负责人',
    `phone` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '办公电话',
    `address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '联系地址',
    `zip_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '邮政编码',
    `email` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '电子邮箱',
    `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '0' COMMENT '状态（0正常 1删除 2停用）',
    `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建者',
    `create_date` datetime(0) DEFAULT NULL COMMENT '创建时间',
    `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '更新者',
    `update_date` datetime(0) DEFAULT NULL COMMENT '更新时间',
    `remarks` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注信息',
    `corp_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '租户代码',
    PRIMARY KEY (`org_code`) USING BTREE,
    INDEX `idx_sys_office_pc`(`parent_code`) USING BTREE,
    INDEX `idx_sys_office_status`(`status`) USING BTREE,
    INDEX `idx_sys_office_ot`(`org_type`) USING BTREE,
    INDEX `idx_sys_office_ts`(`tree_sort`) USING BTREE
  );
  
  -- ----------------------------
  -- Table structure for sys_role
  -- ----------------------------
  CREATE TABLE `sys_role`  (
    `role_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '角色编码',
    `role_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '角色名称',
    `role_type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '角色分类（高管、中层、基层、其它）',
    `role_sort` decimal(10, 0) DEFAULT NULL COMMENT '角色排序（升序）',
    `is_sys` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '系统内置（1是 0否）',
    `user_type` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '用户类型（employee员工 member会员）',
    `data_scope` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '数据范围设置（0未设置  1全部数据 2自定义数据）',
    `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '0' COMMENT '状态（0正常 1删除 2停用）',
    `is_built` tinyint(4) DEFAULT 0,
    `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建者',
    `create_date` datetime(0) DEFAULT NULL COMMENT '创建时间',
    `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '更新者',
    `update_date` datetime(0) DEFAULT NULL COMMENT '更新时间',
    `remarks` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注信息',
    `corp_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '0' COMMENT '租户代码',
    `corp_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'JeeSite' COMMENT '租户名称',
    PRIMARY KEY (`role_code`) USING BTREE,
    INDEX `idx_sys_role_cc`(`corp_code`) USING BTREE,
    INDEX `idx_sys_role_is`(`is_sys`) USING BTREE,
    INDEX `idx_sys_role_status`(`status`) USING BTREE,
    INDEX `idx_sys_role_rs`(`role_sort`) USING BTREE
  );
  
  -- ----------------------------
  -- Table structure for sys_role_data_scope
  -- ----------------------------
  CREATE TABLE `sys_role_data_scope`  (
    `role_code` varchar(64) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL COMMENT '控制角色编码',
    `ctrl_type` varchar(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL COMMENT '控制类型',
    `ctrl_data` varchar(64) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL COMMENT '控制数据',
    `ctrl_permi` varchar(64) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL COMMENT '控制权限',
    PRIMARY KEY (`role_code`, `ctrl_type`, `ctrl_data`, `ctrl_permi`) USING BTREE
  );
  
  -- ----------------------------
  -- Table structure for sys_role_menu
  -- ----------------------------
  CREATE TABLE `sys_role_menu`  (
    `role_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色编码',
    `menu_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '菜单编码',
    `is_built` tinyint(4) DEFAULT 0,
    PRIMARY KEY (`role_code`, `menu_code`) USING BTREE
  );
  
  -- ----------------------------
  -- Table structure for sys_user
  -- ----------------------------
  CREATE TABLE `sys_user`  (
    `user_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户编码',
    `login_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '登录账号',
    `user_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '用户昵称',
    `password` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '登录密码',
    `salt` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
    `org_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
    `email` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '电子邮箱',
    `mobile` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '手机号码',
    `phone` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '办公电话',
    `sex` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '1' COMMENT '用户性别',
    `avatar` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '头像路径',
    `sign` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '个性签名',
    `wx_openid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '绑定的微信号',
    `mobile_imei` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '绑定的手机串号',
    `user_type` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '用户类型',
    `ref_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '用户类型引用编号',
    `ref_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '用户类型引用姓名',
    `mgr_type` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '1' COMMENT '管理员类型（0内置管理员 1系统管理员  2二级管理员3非管理员）',
    `pwd_security_level` decimal(1, 0) DEFAULT NULL COMMENT '密码安全级别（0初始 1很弱 2弱 3安全 4很安全）',
    `pwd_update_date` datetime(0) DEFAULT NULL COMMENT '密码最后更新时间',
    `pwd_update_record` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '密码修改记录',
    `pwd_question` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '密保问题',
    `pwd_question_answer` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '密保问题答案',
    `pwd_question_2` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '密保问题2',
    `pwd_question_answer_2` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '密保问题答案2',
    `pwd_question_3` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '密保问题3',
    `pwd_question_answer_3` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '密保问题答案3',
    `pwd_quest_update_date` datetime(0) DEFAULT NULL COMMENT '密码问题修改时间',
    `last_login_ip` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '最后登陆IP',
    `last_login_date` datetime(0) DEFAULT NULL COMMENT '最后登陆时间',
    `freeze_date` datetime(0) DEFAULT NULL COMMENT '冻结时间',
    `freeze_cause` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '冻结原因',
    `user_weight` decimal(8, 0) DEFAULT 0 COMMENT '用户权重（降序）',
    `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '0' COMMENT '状态（0正常 1删除 2停用 3冻结 9未初始）',
    `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建者',
    `create_date` datetime(0) DEFAULT NULL COMMENT '创建时间',
    `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '更新者',
    `update_date` datetime(0) DEFAULT NULL COMMENT '更新时间',
    `remarks` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注信息',
    `corp_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '0' COMMENT '租户代码',
    `corp_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '租户名称',
    PRIMARY KEY (`user_code`) USING BTREE,
    INDEX `idx_sys_user_lc`(`login_code`) USING BTREE,
    INDEX `idx_sys_user_mobile`(`mobile`) USING BTREE,
    INDEX `idx_sys_user_wo`(`wx_openid`) USING BTREE,
    INDEX `idx_sys_user_imei`(`mobile_imei`) USING BTREE,
    INDEX `idx_sys_user_rt`(`user_type`) USING BTREE,
    INDEX `idx_sys_user_rc`(`ref_code`) USING BTREE,
    INDEX `idx_sys_user_mt`(`mgr_type`) USING BTREE,
    INDEX `idx_sys_user_us`(`user_weight`) USING BTREE,
    INDEX `idx_sys_user_ud`(`update_date`) USING BTREE,
    INDEX `idx_sys_user_status`(`status`) USING BTREE,
    INDEX `idx_sys_user_cc`(`corp_code`) USING BTREE
  );
  
  -- ----------------------------
  -- Table structure for sys_user_data
  -- ----------------------------
  CREATE TABLE `sys_user_data`  (
    `user_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    PRIMARY KEY (`user_code`) USING BTREE
  );
  
  -- ----------------------------
  -- Table structure for sys_user_role
  -- ----------------------------
  CREATE TABLE `sys_user_role`  (
    `user_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户编码',
    `role_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '角色编码',
    PRIMARY KEY (`user_code`, `role_code`) USING BTREE
  );
  
  