text: CREATE DATABASE IF NOT EXISTS `auth`;
  
  USE auth;
  SET FOREIGN_KEY_CHECKS=0;
  
  -- ----------------------------
  -- Table structure for service
  -- ----------------------------
  DROP TABLE IF EXISTS `service`;
  CREATE TABLE `service` (
    `Id` char(36) NOT NULL,
    `Name` varchar(80) DEFAULT NULL,
    `Description` varchar(45) DEFAULT NULL,
    `CreatedBy` char(36) DEFAULT NULL,
    `ModifiedBy` char(36) DEFAULT NULL,
    `CreatedTime` datetime DEFAULT NULL,
    `ModifiedTime` datetime DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Table structure for service_recycle
  -- ----------------------------
  DROP TABLE IF EXISTS `service_recycle`;
  CREATE TABLE `service_recycle` (
    `Id` char(36) NOT NULL,
    `Name` varchar(80) DEFAULT NULL,
    `Description` varchar(45) DEFAULT NULL,
    `CreatedBy` char(36) DEFAULT NULL,
    `ModifiedBy` char(36) DEFAULT NULL,
    `CreatedTime` datetime DEFAULT NULL,
    `ModifiedTime` datetime DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Table structure for api
  -- ----------------------------
  DROP TABLE IF EXISTS `api`;
  CREATE TABLE `api` (
    `Id` char(36) NOT NULL,
    `Controller` varchar(45) DEFAULT NULL,
    `Action` varchar(45) DEFAULT NULL,
    `SecurityObjectId` char(36) DEFAULT NULL,
    `CreatedBy` char(36) DEFAULT NULL,
    `ModifiedBy` char(36) DEFAULT NULL,
    `CreatedTime` datetime DEFAULT NULL,
    `ModifiedTime` datetime DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Table structure for api_recycle
  -- ----------------------------
  DROP TABLE IF EXISTS `api_recycle`;
  CREATE TABLE `api_recycle` (
    `Id` char(36) NOT NULL,
    `Controller` varchar(45) DEFAULT NULL,
    `Action` varchar(45) DEFAULT NULL,
    `SecurityObjectId` char(36) DEFAULT NULL,
    `CreatedBy` char(36) DEFAULT NULL,
    `ModifiedBy` char(36) DEFAULT NULL,
    `CreatedTime` datetime DEFAULT NULL,
    `ModifiedTime` datetime DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Records of api_recycle
  -- ----------------------------
  
  -- ----------------------------
  -- Table structure for group
  -- ----------------------------
  DROP TABLE IF EXISTS `group`;
  CREATE TABLE `group` (
    `Id` char(36) NOT NULL,
    `ParentId` char(36) DEFAULT NULL,
    `CreatedBy` char(36) DEFAULT NULL,
    `ModifiedBy` char(36) DEFAULT NULL,
    `CreatedTime` datetime DEFAULT NULL,
    `ModifiedTime` datetime DEFAULT NULL,
    `PrincipalId` char(36) DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Records of group
  -- ----------------------------
  
  -- ----------------------------
  -- Table structure for group_recycle
  -- ----------------------------
  DROP TABLE IF EXISTS `group_recycle`;
  CREATE TABLE `group_recycle` (
    `Id` char(36) NOT NULL,
    `ParentId` char(36) DEFAULT NULL,
    `CreatedBy` char(36) DEFAULT NULL,
    `ModifiedBy` char(36) DEFAULT NULL,
    `CreatedTime` datetime DEFAULT NULL,
    `ModifiedTime` datetime DEFAULT NULL,
    `PrincipalId` char(36) DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Records of group_recycle
  -- ----------------------------
  
  -- ----------------------------
  -- Table structure for group_user
  -- ----------------------------
  DROP TABLE IF EXISTS `group_user`;
  CREATE TABLE `group_user` (
    `Id` char(36) NOT NULL,
    `GroupId` char(36) DEFAULT NULL,
    `UserId` char(36) DEFAULT NULL,
    `CreatedBy` char(36) DEFAULT NULL,
    `ModifiedBy` char(36) DEFAULT NULL,
    `CreatedTime` datetime DEFAULT NULL,
    `ModifiedTime` datetime DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Records of group_user
  -- ----------------------------
  
  -- ----------------------------
  -- Table structure for group_user_recycle
  -- ----------------------------
  DROP TABLE IF EXISTS `group_user_recycle`;
  CREATE TABLE `group_user_recycle` (
    `Id` char(36) NOT NULL,
    `GroupId` char(36) DEFAULT NULL,
    `UserId` char(36) DEFAULT NULL,
    `CreatedBy` char(36) DEFAULT NULL,
    `ModifiedBy` char(36) DEFAULT NULL,
    `CreatedTime` datetime DEFAULT NULL,
    `ModifiedTime` datetime DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Records of group_user_recycle
  -- ----------------------------
  
  -- ----------------------------
  -- Table structure for module
  -- ----------------------------
  DROP TABLE IF EXISTS `module`;
  CREATE TABLE `module` (
    `Id` char(36) NOT NULL,
    `Code` varchar(45) DEFAULT NULL,
    `ParentId` char(36) DEFAULT NULL,
    `SecurityObjectId` char(36) DEFAULT NULL,
    `CreatedBy` char(36) DEFAULT NULL,
    `ModifiedBy` char(36) DEFAULT NULL,
    `CreatedTime` datetime DEFAULT NULL,
    `ModifiedTime` datetime DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Records of module
  -- ----------------------------
  
  -- ----------------------------
  -- Table structure for module_recycle
  -- ----------------------------
  DROP TABLE IF EXISTS `module_recycle`;
  CREATE TABLE `module_recycle` (
    `Id` char(36) NOT NULL,
    `Code` varchar(45) DEFAULT NULL,
    `ParentId` char(36) DEFAULT NULL,
    `SecurityObjectId` char(36) DEFAULT NULL,
    `CreatedBy` char(36) DEFAULT NULL,
    `ModifiedBy` char(36) DEFAULT NULL,
    `CreatedTime` datetime DEFAULT NULL,
    `ModifiedTime` datetime DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Table structure for principal
  -- ----------------------------
  DROP TABLE IF EXISTS `principal`;
  CREATE TABLE `principal` (
    `Id` char(36) NOT NULL,
    `PrincipalType` int(11) DEFAULT NULL,
    `CreatedBy` char(36) DEFAULT NULL,
    `ModifiedBy` char(36) DEFAULT NULL,
    `CreatedTime` datetime DEFAULT NULL,
    `ModifiedTime` datetime DEFAULT NULL,
    `Name` varchar(80) DEFAULT NULL,
    `Description` varchar(200) DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Table structure for principal_recycle
  -- ----------------------------
  DROP TABLE IF EXISTS `principal_recycle`;
  CREATE TABLE `principal_recycle` (
    `Id` char(36) NOT NULL,
    `PrincipalType` int(11) DEFAULT NULL,
    `Name` varchar(80) DEFAULT NULL,
    `Description` varchar(200) DEFAULT NULL,
    `CreatedBy` char(36) DEFAULT NULL,
    `ModifiedBy` char(36) DEFAULT NULL,
    `CreatedTime` datetime DEFAULT NULL,
    `ModifiedTime` datetime DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Table structure for principal_role
  -- ----------------------------
  DROP TABLE IF EXISTS `principal_role`;
  CREATE TABLE `principal_role` (
    `Id` char(36) NOT NULL,
    `PrincipalId` char(36) DEFAULT NULL,
    `RoleId` char(36) DEFAULT NULL,
    `CreatedBy` char(36) DEFAULT NULL,
    `ModifiedBy` char(36) DEFAULT NULL,
    `CreatedTime` datetime DEFAULT NULL,
    `ModifiedTime` datetime DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Table structure for principal_role_recycle
  -- ----------------------------
  DROP TABLE IF EXISTS `principal_role_recycle`;
  CREATE TABLE `principal_role_recycle` (
    `Id` char(36) NOT NULL,
    `PrincipalId` char(36) DEFAULT NULL,
    `RoleId` char(36) DEFAULT NULL,
    `CreatedBy` char(36) DEFAULT NULL,
    `ModifiedBy` char(36) DEFAULT NULL,
    `CreatedTime` datetime DEFAULT NULL,
    `ModifiedTime` datetime DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Table structure for role
  -- ----------------------------
  DROP TABLE IF EXISTS `role`;
  CREATE TABLE `role` (
    `Id` char(36) NOT NULL,
    `Name` varchar(80) DEFAULT NULL,
    `Code` varchar(45) DEFAULT NULL,
    `Description` varchar(200) DEFAULT NULL,
    `CreatedBy` char(36) DEFAULT NULL,
    `ModifiedBy` char(36) DEFAULT NULL,
    `CreatedTime` datetime DEFAULT NULL,
    `ModifiedTime` datetime DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Table structure for role_recycle
  -- ----------------------------
  DROP TABLE IF EXISTS `role_recycle`;
  CREATE TABLE `role_recycle` (
    `Id` char(36) NOT NULL,
    `Name` varchar(80) DEFAULT NULL,
    `Code` varchar(45) DEFAULT NULL,
    `Description` varchar(200) DEFAULT NULL,
    `CreatedBy` char(36) DEFAULT NULL,
    `ModifiedBy` char(36) DEFAULT NULL,
    `CreatedTime` datetime DEFAULT NULL,
    `ModifiedTime` datetime DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Table structure for role_security
  -- ----------------------------
  DROP TABLE IF EXISTS `role_security`;
  CREATE TABLE `role_security` (
    `Id` char(36) NOT NULL,
    `SecurityObjectId` char(36) DEFAULT NULL,
    `RoleId` char(36) DEFAULT NULL,
    `CreatedBy` char(36) DEFAULT NULL,
    `ModifiedBy` char(36) DEFAULT NULL,
    `CreatedTime` datetime DEFAULT NULL,
    `ModifiedTime` datetime DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Table structure for role_security_recycle
  -- ----------------------------
  DROP TABLE IF EXISTS `role_security_recycle`;
  CREATE TABLE `role_security_recycle` (
    `Id` char(36) NOT NULL,
    `SecurityObjectId` char(36) DEFAULT NULL,
    `RoleId` char(36) DEFAULT NULL,
    `CreatedBy` char(36) DEFAULT NULL,
    `ModifiedBy` char(36) DEFAULT NULL,
    `CreatedTime` datetime DEFAULT NULL,
    `ModifiedTime` datetime DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Table structure for securityobject
  -- ----------------------------
  DROP TABLE IF EXISTS `securityobject`;
  CREATE TABLE `securityobject` (
    `Id` char(36) NOT NULL,
    `ServiceId` char(36) DEFAULT NULL,
    `Name` varchar(80) DEFAULT NULL,
    `Description` varchar(200) DEFAULT NULL,
    `CreatedBy` char(36) DEFAULT NULL,
    `ModifiedBy` char(36) DEFAULT NULL,
    `CreatedTime` datetime DEFAULT NULL,
    `ModifiedTime` datetime DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Table structure for securityobject_recycle
  -- ----------------------------
  DROP TABLE IF EXISTS `securityobject_recycle`;
  CREATE TABLE `securityobject_recycle` (
    `Id` char(36) NOT NULL,
    `ServiceId` char(36) DEFAULT NULL,
    `Name` varchar(80) DEFAULT NULL,
    `Description` varchar(200) DEFAULT NULL,
    `CreatedBy` char(36) DEFAULT NULL,
    `ModifiedBy` char(36) DEFAULT NULL,
    `CreatedTime` datetime DEFAULT NULL,
    `ModifiedTime` datetime DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Table structure for user
  -- ----------------------------
  DROP TABLE IF EXISTS `user`;
  CREATE TABLE `user` (
    `Id` char(36) NOT NULL,
    `Type` int(11) DEFAULT NULL,
    `Salt` char(36) DEFAULT NULL,
    `SaltMD5Password` varchar(45) DEFAULT NULL,
    `Email` varchar(45) DEFAULT NULL,
    `Mobile` varchar(45) DEFAULT NULL,
    `CreatedBy` char(36) DEFAULT NULL,
    `ModifiedBy` char(36) DEFAULT NULL,
    `CreatedTime` datetime DEFAULT NULL,
    `ModifiedTime` datetime DEFAULT NULL,
    `PrincipalId` char(36) DEFAULT NULL,
    `TenantId` char(36) DEFAULT NULL,
    `GoogleId` varchar(100) DEFAULT NULL,
    `GoogleEmail` varchar(100) DEFAULT NULL,
    `DisplayName` varchar(45) DEFAULT NULL,
    `Department` varchar(45) DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Table structure for user_recycle
  -- ----------------------------
  DROP TABLE IF EXISTS `user_recycle`;
  CREATE TABLE `user_recycle` (
    `Id` char(36) NOT NULL,
    `Salt` char(36) DEFAULT NULL,
    `SaltMD5Password` varchar(45) DEFAULT NULL,
    `Email` varchar(45) DEFAULT NULL,
    `Mobile` varchar(45) DEFAULT NULL,
    `CreatedBy` char(36) DEFAULT NULL,
    `ModifiedBy` char(36) DEFAULT NULL,
    `CreatedTime` datetime DEFAULT NULL,
    `ModifiedTime` datetime DEFAULT NULL,
    `PrincipalId` char(36) DEFAULT NULL,
    `TenantId` char(36) DEFAULT NULL,
    `GoogleId` varchar(100) DEFAULT NULL,
    `GoogleEmail` varchar(100) DEFAULT NULL,
    `DisplayName` varchar(45) DEFAULT NULL,
    `Department` varchar(45) DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Table structure for tenant
  -- ----------------------------
  DROP TABLE IF EXISTS `tenant`;
  CREATE TABLE `tenant` (
    `Id` char(36) NOT NULL,
    `Name` varchar(45) DEFAULT NULL,
    `CreatedBy` char(36) DEFAULT NULL,
    `ModifiedBy` char(36) DEFAULT NULL,
    `CreatedTime` datetime DEFAULT NULL,
    `ModifiedTime` datetime DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Table structure for tenant_recycle
  -- ----------------------------
  DROP TABLE IF EXISTS `tenant_recycle`;
  CREATE TABLE `tenant_recycle` (
    `Id` char(36) NOT NULL,
    `Name` varchar(45) DEFAULT NULL,
    `CreatedBy` char(36) DEFAULT NULL,
    `ModifiedBy` char(36) DEFAULT NULL,
    `CreatedTime` datetime DEFAULT NULL,
    `ModifiedTime` datetime DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  