/*
 Navicat Premium Dump SQL

 Source Server         : 222.184.49.223308
 Source Server Type    : MySQL
 Source Server Version : 80042 (8.0.42)
 Source Host           : 222.184.49.22:3308
 Source Schema         : jnpf_tenant_init_v500

 Target Server Type    : MySQL
 Target Server Version : 80042 (8.0.42)
 File Encoding         : 65001

 Date: 30/06/2025 08:41:46
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for base_tenant
-- ----------------------------
DROP TABLE IF EXISTS `base_tenant`;
CREATE TABLE `base_tenant`  (
  `f_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '自然主键',
  `f_en_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编号',
  `f_full_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名称',
  `f_db_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务名称',
  `f_description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
  `f_sort_code` bigint NULL DEFAULT NULL COMMENT '排序',
  `f_enabled_mark` int NULL DEFAULT NULL COMMENT '有效标志',
  `f_creator_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `f_creator_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建用户',
  `f_last_modify_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `f_last_modify_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '修改用户',
  `f_delete_mark` int NULL DEFAULT NULL COMMENT '删除标志',
  `f_delete_time` datetime NULL DEFAULT NULL COMMENT '删除时间',
  `f_delete_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '删除用户',
  `f_tenant_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户主键',
  `f_start_time` datetime NULL DEFAULT NULL COMMENT '起始时间',
  `f_end_time` datetime NULL DEFAULT NULL COMMENT '过期时间',
  `f_account_num` bigint NULL DEFAULT NULL COMMENT '账号额度',
  `f_type` int NULL DEFAULT NULL COMMENT '类型(0-库隔离 1-id隔离 2-连接隔离)',
  `f_db_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据库类型',
  `f_unit_info_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '单位信息',
  `f_user_info_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '联系人信息',
  PRIMARY KEY (`f_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '租户表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of base_tenant
-- ----------------------------

-- ----------------------------
-- Table structure for base_tenant_account
-- ----------------------------
DROP TABLE IF EXISTS `base_tenant_account`;
CREATE TABLE `base_tenant_account`  (
  `f_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '自然主键',
  `f_account` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '账户',
  `f_password` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '密码',
  `f_real_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '姓名',
  `f_gender` int NULL DEFAULT NULL COMMENT '性别',
  `f_is_administrator` int NULL DEFAULT NULL COMMENT '是否管理员',
  `f_description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
  `f_sort_code` bigint NULL DEFAULT NULL COMMENT '排序',
  `f_enabled_mark` int NULL DEFAULT NULL COMMENT '有效标志',
  `f_creator_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `f_creator_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建用户',
  `f_last_modify_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `f_last_modify_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '修改用户',
  `f_delete_time` datetime NULL DEFAULT NULL COMMENT '删除时间',
  `f_delete_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '删除用户',
  `f_delete_mark` int NULL DEFAULT NULL COMMENT '删除标志',
  `f_tenant_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户主键',
  `f_mobile_phone` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机号码',
  PRIMARY KEY (`f_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户信息' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of base_tenant_account
-- ----------------------------
INSERT INTO `base_tenant_account` VALUES ('47ff0279-aa26a4fbeb59f630c8776f759', 'admin', '14e1b600b1fd579f47433b88e8d85291', '管理员', 1, 1, 'admin', 1, 1, '2021-09-18 18:01:08', '1', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `base_tenant_account` VALUES ('708290233451415429', 'admin', '14e1b600b1fd579f47433b88e8d85291', '管理员', 1, 1, 'admin', 1, 1, '2021-09-18 18:01:08', '1', NULL, NULL, NULL, NULL, NULL, 'jnpf_tenant_init_v500', NULL);
INSERT INTO `base_tenant_account` VALUES ('708299713727694725', 'admin', '14e1b600b1fd579f47433b88e8d85291', '管理员', 1, 1, 'admin', 1, 1, '2021-09-18 18:01:08', '1', NULL, NULL, NULL, NULL, NULL, 'jnpf_tenant_init_v500', NULL);

-- ----------------------------
-- Table structure for base_tenant_authorize
-- ----------------------------
DROP TABLE IF EXISTS `base_tenant_authorize`;
CREATE TABLE `base_tenant_authorize`  (
  `f_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '自然主键',
  `f_module_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '未授权菜单id',
  `f_url_address` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '功能地址',
  `f_tenant_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户主键',
  `f_sort_code` bigint NULL DEFAULT NULL COMMENT '排序',
  `f_creator_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `f_creator_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建用户',
  `f_last_modify_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `f_last_modify_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '修改用户',
  `f_delete_mark` int NULL DEFAULT NULL COMMENT '删除标志',
  `f_delete_time` datetime NULL DEFAULT NULL COMMENT '删除时间',
  `f_delete_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '删除用户',
  PRIMARY KEY (`f_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '租户权限' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of base_tenant_authorize
-- ----------------------------

-- ----------------------------
-- Table structure for base_tenant_link
-- ----------------------------
DROP TABLE IF EXISTS `base_tenant_link`;
CREATE TABLE `base_tenant_link`  (
  `f_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '自然主键',
  `f_full_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '连接名称',
  `f_config_type` int NULL DEFAULT NULL COMMENT '配置类型（0：主，1：从）',
  `f_host` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主机地址',
  `f_port` int NULL DEFAULT NULL COMMENT '端口',
  `f_user_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户',
  `f_password` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '密码',
  `f_service_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务名称',
  `f_description` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '描述',
  `f_sort_code` bigint NULL DEFAULT NULL COMMENT '排序',
  `f_enabled_mark` int NULL DEFAULT NULL COMMENT '有效标志',
  `f_creator_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `f_creator_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建用户',
  `f_last_modify_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `f_last_modify_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '修改用户',
  `f_delete_mark` int NULL DEFAULT NULL COMMENT '删除标志',
  `f_delete_time` datetime NULL DEFAULT NULL COMMENT '删除时间',
  `f_delete_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '删除用户',
  `f_db_schema` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '表模式',
  `f_table_space` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '表空间',
  `f_oracle_param` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'oracle参数',
  `f_connection_str` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '自定义连接语句',
  `f_tenant_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户id',
  `f_db_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据库类型',
  PRIMARY KEY (`f_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '租户数据连接' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of base_tenant_link
-- ----------------------------

-- ----------------------------
-- Table structure for base_tenant_log
-- ----------------------------
DROP TABLE IF EXISTS `base_tenant_log`;
CREATE TABLE `base_tenant_log`  (
  `f_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '自然主键',
  `f_tenant_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户主键',
  `f_login_account` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '登录账户',
  `f_login_ip_address` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'IP地址',
  `f_login_ip_address_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'IP所在城市',
  `f_login_source_website` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '来源网站',
  `f_login_time` datetime NULL DEFAULT NULL COMMENT '登录时间',
  `f_description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
  `f_sort_code` bigint NULL DEFAULT NULL COMMENT '排序',
  `f_creator_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `f_creator_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建用户',
  `f_last_modify_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `f_last_modify_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '修改用户',
  `f_delete_mark` int NULL DEFAULT NULL COMMENT '删除标志',
  `f_delete_time` datetime NULL DEFAULT NULL COMMENT '删除时间',
  `f_delete_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '删除用户',
  PRIMARY KEY (`f_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '租户日志表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of base_tenant_log
-- ----------------------------

-- ----------------------------
-- Table structure for base_tenant_socials
-- ----------------------------
DROP TABLE IF EXISTS `base_tenant_socials`;
CREATE TABLE `base_tenant_socials`  (
  `f_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '自然主键',
  `f_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户id',
  `f_account` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户账号',
  `f_account_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户账号名称',
  `f_social_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '第三方类型',
  `f_social_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '第三方账号id',
  `f_social_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '第三方账号',
  `f_tenant_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户id',
  `f_description` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  `f_sort_code` bigint NULL DEFAULT NULL COMMENT '排序',
  `f_creator_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建用户',
  `f_creator_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `f_last_modify_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `f_last_modify_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '修改用户',
  `f_delete_mark` int NULL DEFAULT NULL COMMENT '删除标记',
  `f_delete_time` datetime NULL DEFAULT NULL COMMENT '删除时间',
  `f_delete_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '删除用户',
  PRIMARY KEY (`f_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '多租户第三方绑定表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of base_tenant_socials
-- ----------------------------

SET FOREIGN_KEY_CHECKS = 1;
