Files
be.ems/database/install/sys_tenant.sql

47 lines
2.4 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
Navicat Premium Data Transfer
Source Server : root@192.168.2.166
Source Server Type : MariaDB
Source Server Version : 100616 (10.6.16-MariaDB-0ubuntu0.22.04.1)
Source Host : 192.168.2.166:33066
Source Schema : tenants_db
Target Server Type : MariaDB
Target Server Version : 100616 (10.6.16-MariaDB-0ubuntu0.22.04.1)
File Encoding : 65001
Date: 19/06/2024 15:49:42
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for sys_tenant
-- ----------------------------
DROP TABLE IF EXISTS `sys_tenant`;
CREATE TABLE `sys_tenant` (
`tenant_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Tenant id',
`parent_id` bigint(20) NULL DEFAULT 0 COMMENT '父id 默认0',
`ancestors` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '祖级列表',
`tenant_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '租户名称',
`order_num` int(11) NULL DEFAULT 0 COMMENT '显示顺序',
`tenancy_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'tenancy type: sd-sst, apn, imsi, msisdn',
`tenancy_key` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'tenancy key: key of sd-sst, apn, imsi, msisdn',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '状态0停用 1正常',
`del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '删除标志0代表存在 1代表删除',
`create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` bigint(20) NULL DEFAULT 0 COMMENT '创建时间',
`update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` bigint(20) NULL DEFAULT 0 COMMENT '更新时间',
PRIMARY KEY (`tenant_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 123 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '部门表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_tenant
-- ----------------------------
-- INSERT INTO `sys_tenant` VALUES (1, 0, '0', 'TenantRoot', 0, '', '', '1', '0', 'admin', 1699348237468, '', 1718783333041);
SET FOREIGN_KEY_CHECKS = 1;