SHOW TABLES LIKE 'tp_tenant_domain' [ RunTime:0.001123s ]
SHOW FULL COLUMNS FROM `tp_tenant_domain` [ RunTime:0.001413s ]
SELECT * FROM `tp_tenant_domain` WHERE `domain` = 'saas.cpumax.cn' AND `status` = 1 LIMIT 1 [ RunTime:0.000738s ]
SHOW FULL COLUMNS FROM `tp_tenant` [ RunTime:0.001213s ]
SELECT * FROM `tp_tenant` WHERE `id` = 1 AND `status` > 0 AND `delete_time` IS NULL LIMIT 1 [ RunTime:0.000634s ]
SELECT COUNT(*) as c FROM information_schema.COLUMNS WHERE TABLE_SCHEMA='saashuhang' AND TABLE_NAME='tp_user' AND COLUMN_NAME='delete_time' [ RunTime:0.001574s ]
SHOW FULL COLUMNS FROM `tp_user` [ RunTime:0.001534s ]
SELECT COUNT(*) AS think_count FROM `tp_user` WHERE `delete_time` IS NULL [ RunTime:0.000558s ]
SELECT COUNT(*) AS think_count FROM `tp_user` WHERE `delete_time` IS NULL AND `create_time` >= 1776787200 [ RunTime:0.000492s ]
SELECT COUNT(*) as c FROM information_schema.COLUMNS WHERE TABLE_SCHEMA='saashuhang' AND TABLE_NAME='tp_user' AND COLUMN_NAME='is_fighter' [ RunTime:0.001389s ]
SELECT COUNT(*) AS think_count FROM `tp_user` WHERE `tenant_id` = 1 AND `delete_time` IS NULL AND `is_fighter` = 1 [ RunTime:0.000535s ]
SELECT COUNT(*) as c FROM information_schema.COLUMNS WHERE TABLE_SCHEMA='saashuhang' AND TABLE_NAME='tp_user' AND COLUMN_NAME='is_player' [ RunTime:0.001399s ]
SELECT COUNT(*) AS think_count FROM `tp_user` WHERE `tenant_id` = 1 AND `delete_time` IS NULL AND `is_player` = 1 [ RunTime:0.000528s ]
SELECT COUNT(*) as c FROM information_schema.COLUMNS WHERE TABLE_SCHEMA='saashuhang' AND TABLE_NAME='tp_user' AND COLUMN_NAME='last_active_time' [ RunTime:0.001358s ]
SELECT COUNT(*) AS think_count FROM `tp_user` WHERE `tenant_id` = 1 AND `delete_time` IS NULL AND `last_active_time` > 1776845087 [ RunTime:0.000510s ]
SELECT COUNT(*) as c FROM information_schema.TABLES WHERE TABLE_SCHEMA='saashuhang' AND TABLE_NAME='tp_order' [ RunTime:0.000497s ]
SHOW FULL COLUMNS FROM `tp_order` [ RunTime:0.001650s ]
SELECT COUNT(*) AS think_count FROM `tp_order` [ RunTime:0.000589s ]
SELECT COUNT(*) AS think_count FROM `tp_order` WHERE `create_time` >= 1776787200 [ RunTime:0.000475s ]
SELECT SUM(`amount`) AS think_sum FROM `tp_order` WHERE `status` >= 1 AND `status` <> 4 [ RunTime:0.000604s ]
SELECT SUM(`amount`) AS think_sum FROM `tp_order` WHERE `status` >= 1 AND `status` <> 4 AND `create_time` >= 1776787200 [ RunTime:0.000491s ]
SELECT COUNT(*) as c FROM information_schema.TABLES WHERE TABLE_SCHEMA='saashuhang' AND TABLE_NAME='tp_player_order' [ RunTime:0.000506s ]
SHOW FULL COLUMNS FROM `tp_player_order` [ RunTime:0.001183s ]
SELECT COUNT(*) AS think_count FROM `tp_player_order` [ RunTime:0.000405s ]
SELECT COUNT(*) AS think_count FROM `tp_player_order` WHERE `create_time` >= 1776787200 [ RunTime:0.000426s ]
SELECT SUM(`amount`) AS think_sum FROM `tp_player_order` WHERE `status` >= 1 AND `status` <> 4 [ RunTime:0.000454s ]
SELECT SUM(`amount`) AS think_sum FROM `tp_player_order` WHERE `status` >= 1 AND `status` <> 4 AND `create_time` >= 1776787200 [ RunTime:0.000464s ]
SELECT COUNT(*) as c FROM information_schema.TABLES WHERE TABLE_SCHEMA='saashuhang' AND TABLE_NAME='tp_withdrawal' [ RunTime:0.000496s ]
SHOW FULL COLUMNS FROM `tp_withdrawal` [ RunTime:0.000997s ]
SHOW COLUMNS FROM `tp_admin` [ RunTime:0.001813s ]
SHOW COLUMNS FROM `tp_admin_role` [ RunTime:0.001011s ]
CREATE TABLE IF NOT EXISTS `tp_admin_domain` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`admin_id` int(11) unsigned NOT NULL DEFAULT 0,
`domain` varchar(190) NOT NULL DEFAULT '',
`status` tinyint(1) NOT NULL DEFAULT 1,
`create_time` int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_admin_domain` (`admin_id`,`domain`),
KEY `idx_domain` (`domain`),
KEY `idx_admin_id` (`admin_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='管理员绑定域名'; [ RunTime:0.007125s ]
SHOW COLUMNS FROM `tp_user` [ RunTime:0.001524s ]
SHOW COLUMNS FROM `tp_user` [ RunTime:0.001354s ]
SHOW COLUMNS FROM `tp_user` [ RunTime:0.001322s ]
SHOW COLUMNS FROM `tp_user` [ RunTime:0.001349s ]
SHOW COLUMNS FROM `tp_user` [ RunTime:0.001469s ]
SHOW COLUMNS FROM `tp_user` [ RunTime:0.001447s ]
SHOW COLUMNS FROM `tp_user` [ RunTime:0.001368s ]
SHOW COLUMNS FROM `tp_user` [ RunTime:0.001414s ]
SHOW COLUMNS FROM `tp_user` [ RunTime:0.001459s ]
SHOW COLUMNS FROM `tp_user` [ RunTime:0.001397s ]
SHOW COLUMNS FROM `tp_user` [ RunTime:0.001387s ]
SHOW COLUMNS FROM `tp_user` [ RunTime:0.001360s ]
SHOW COLUMNS FROM `tp_user` [ RunTime:0.001395s ]
SHOW COLUMNS FROM `tp_user` [ RunTime:0.001447s ]
SHOW COLUMNS FROM `tp_user` [ RunTime:0.001360s ]
SHOW COLUMNS FROM `tp_user` [ RunTime:0.001431s ]
SHOW COLUMNS FROM `tp_user` [ RunTime:0.001352s ]
SHOW COLUMNS FROM `tp_user` [ RunTime:0.001364s ]
SHOW COLUMNS FROM `tp_user` [ RunTime:0.001360s ]
SHOW COLUMNS FROM `tp_user` [ RunTime:0.001360s ]
SHOW COLUMNS FROM `tp_user` [ RunTime:0.001441s ]
SHOW COLUMNS FROM `tp_user` [ RunTime:0.001359s ]
SHOW COLUMNS FROM `tp_order` [ RunTime:0.001461s ]
SHOW COLUMNS FROM `tp_game` [ RunTime:0.000935s ]
SHOW COLUMNS FROM `tp_game_category` [ RunTime:0.000835s ]
SHOW COLUMNS FROM `tp_order` [ RunTime:0.001405s ]
SHOW COLUMNS FROM `tp_order` [ RunTime:0.001438s ]
SHOW COLUMNS FROM `tp_order` [ RunTime:0.001449s ]
SHOW COLUMNS FROM `tp_order` [ RunTime:0.001408s ]
SHOW COLUMNS FROM `tp_order` [ RunTime:0.001450s ]
SHOW COLUMNS FROM `tp_order` [ RunTime:0.001405s ]
SHOW COLUMNS FROM `tp_order` [ RunTime:0.001736s ]
SHOW COLUMNS FROM `tp_order` [ RunTime:0.001484s ]
SHOW COLUMNS FROM `tp_order` [ RunTime:0.001442s ]
SHOW COLUMNS FROM `tp_recharge_order` [ RunTime:0.000892s ]
SHOW COLUMNS FROM `tp_recharge_order` [ RunTime:0.000816s ]
SHOW COLUMNS FROM `tp_recharge_order` [ RunTime:0.000795s ]
SHOW COLUMNS FROM `tp_recharge_order` [ RunTime:0.000805s ]
SHOW COLUMNS FROM `tp_recharge_order` [ RunTime:0.000802s ]
SHOW COLUMNS FROM `tp_recharge_order` [ RunTime:0.000806s ]
SHOW COLUMNS FROM `tp_recharge_order` [ RunTime:0.000790s ]
SHOW COLUMNS FROM `tp_gift_record` [ RunTime:0.000829s ]
SHOW COLUMNS FROM `tp_gift_record` [ RunTime:0.000790s ]
SHOW COLUMNS FROM `tp_gift_record` [ RunTime:0.000771s ]
SHOW COLUMNS FROM `tp_gift_record` [ RunTime:0.000784s ]
SHOW COLUMNS FROM `tp_merchant` [ RunTime:0.000951s ]
SHOW COLUMNS FROM `tp_merchant` [ RunTime:0.000870s ]
SHOW COLUMNS FROM `tp_merchant` [ RunTime:0.000877s ]
SHOW COLUMNS FROM `tp_merchant` [ RunTime:0.000877s ]
SHOW COLUMNS FROM `tp_merchant` [ RunTime:0.000880s ]
SHOW COLUMNS FROM `tp_merchant_staff` [ RunTime:0.000886s ]
SHOW COLUMNS FROM `tp_merchant_staff` [ RunTime:0.000838s ]
SHOW COLUMNS FROM `tp_merchant_staff` [ RunTime:0.000831s ]
SHOW COLUMNS FROM `tp_merchant_staff` [ RunTime:0.000846s ]
SHOW COLUMNS FROM `tp_merchant_staff` [ RunTime:0.000826s ]
SHOW COLUMNS FROM `tp_merchant_staff` [ RunTime:0.000827s ]
CREATE TABLE IF NOT EXISTS `tp_merchant` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) unsigned NOT NULL DEFAULT 0,
`username` varchar(50) NOT NULL DEFAULT '',
`phone` varchar(20) NOT NULL DEFAULT '',
`nickname` varchar(100) NOT NULL DEFAULT '',
`merchant_name` varchar(100) NOT NULL DEFAULT '',
`password` varchar(255) NOT NULL DEFAULT '',
`invite_code` varchar(20) NOT NULL DEFAULT '',
`balance` decimal(10,2) NOT NULL DEFAULT 0.00,
`status` tinyint(1) NOT NULL DEFAULT 1,
`create_time` int(11) unsigned NOT NULL DEFAULT 0,
`update_time` int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_user_id` (`user_id`),
UNIQUE KEY `uk_username` (`username`),
KEY `idx_phone` (`phone`),
KEY `idx_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商家账号表' [ RunTime:0.008423s ]
CREATE TABLE IF NOT EXISTS `tp_merchant_verify` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) unsigned NOT NULL DEFAULT 0,
`username` varchar(50) NOT NULL DEFAULT '',
`phone` varchar(20) NOT NULL DEFAULT '',
`nickname` varchar(100) NOT NULL DEFAULT '',
`merchant_name` varchar(100) NOT NULL DEFAULT '',
`password` varchar(255) NOT NULL DEFAULT '',
`verify_status` tinyint(3) unsigned NOT NULL DEFAULT 0,
`reject_reason` varchar(255) NOT NULL DEFAULT '',
`verify_time` int(10) unsigned NOT NULL DEFAULT 0,
`create_time` int(11) unsigned NOT NULL DEFAULT 0,
`update_time` int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `idx_user_id` (`user_id`),
KEY `idx_username` (`username`),
KEY `idx_verify_status` (`verify_status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商家开通申请表' [ RunTime:0.008531s ]
CREATE TABLE IF NOT EXISTS `tp_merchant_staff` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`merchant_id` int(11) unsigned NOT NULL DEFAULT 0,
`username` varchar(50) NOT NULL DEFAULT '',
`phone` varchar(20) NOT NULL DEFAULT '',
`nickname` varchar(100) NOT NULL DEFAULT '',
`password` varchar(255) NOT NULL DEFAULT '',
`openid` varchar(100) NOT NULL DEFAULT '',
`unionid` varchar(100) NOT NULL DEFAULT '',
`avatar` varchar(500) NOT NULL DEFAULT '',
`wx_nickname` varchar(100) NOT NULL DEFAULT '',
`profit_share_enabled` tinyint(1) NOT NULL DEFAULT 0,
`profit_share_rate` decimal(5,2) NOT NULL DEFAULT 0.00,
`can_create_order` tinyint(1) NOT NULL DEFAULT 1,
`can_withdraw` tinyint(1) NOT NULL DEFAULT 1,
`status` tinyint(1) NOT NULL DEFAULT 1,
`last_login_time` int(11) unsigned NOT NULL DEFAULT 0,
`last_login_ip` varchar(64) NOT NULL DEFAULT '',
`create_time` int(11) unsigned NOT NULL DEFAULT 0,
`update_time` int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_merchant_username` (`merchant_id`,`username`),
KEY `idx_merchant_id` (`merchant_id`),
KEY `idx_openid` (`openid`),
KEY `idx_unionid` (`unionid`),
KEY `idx_phone` (`phone`),
KEY `idx_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商家客服账号表' [ RunTime:0.008321s ]
CREATE TABLE IF NOT EXISTS `tp_merchant_staff_token` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`staff_id` int(11) unsigned NOT NULL DEFAULT 0,
`token` varchar(128) NOT NULL DEFAULT '',
`session_key` varchar(100) NOT NULL DEFAULT '',
`expire_time` int(11) unsigned NOT NULL DEFAULT 0,
`create_time` int(11) unsigned NOT NULL DEFAULT 0,
`update_time` int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_token` (`token`),
KEY `idx_staff_id` (`staff_id`),
KEY `idx_expire_time` (`expire_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商家客服小程序登录Token表' [ RunTime:0.008033s ]
CREATE TABLE IF NOT EXISTS `tp_manager` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) unsigned NOT NULL DEFAULT 0,
`username` varchar(50) NOT NULL DEFAULT '',
`phone` varchar(20) NOT NULL DEFAULT '',
`nickname` varchar(100) NOT NULL DEFAULT '',
`manager_name` varchar(100) NOT NULL DEFAULT '',
`password` varchar(255) NOT NULL DEFAULT '',
`invite_code` varchar(20) NOT NULL DEFAULT '',
`balance` decimal(10,2) NOT NULL DEFAULT 0.00,
`status` tinyint(1) NOT NULL DEFAULT 1,
`create_time` int(11) unsigned NOT NULL DEFAULT 0,
`update_time` int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_user_id` (`user_id`),
UNIQUE KEY `uk_username` (`username`),
UNIQUE KEY `uk_invite_code` (`invite_code`),
KEY `idx_phone` (`phone`),
KEY `idx_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='管事账号表' [ RunTime:0.008279s ]
CREATE TABLE IF NOT EXISTS `tp_manager_verify` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) unsigned NOT NULL DEFAULT 0,
`username` varchar(50) NOT NULL DEFAULT '',
`phone` varchar(20) NOT NULL DEFAULT '',
`nickname` varchar(100) NOT NULL DEFAULT '',
`manager_name` varchar(100) NOT NULL DEFAULT '',
`password` varchar(255) NOT NULL DEFAULT '',
`verify_status` tinyint(3) unsigned NOT NULL DEFAULT 0,
`reject_reason` varchar(255) NOT NULL DEFAULT '',
`verify_time` int(10) unsigned NOT NULL DEFAULT 0,
`create_time` int(11) unsigned NOT NULL DEFAULT 0,
`update_time` int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `idx_user_id` (`user_id`),
KEY `idx_username` (`username`),
KEY `idx_verify_status` (`verify_status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='管事开通申请表' [ RunTime:0.007849s ]
SHOW COLUMNS FROM `tp_manager` [ RunTime:0.001010s ]
SHOW COLUMNS FROM `tp_manager` [ RunTime:0.000857s ]
SHOW COLUMNS FROM `tp_manager` [ RunTime:0.000803s ]
SHOW COLUMNS FROM `tp_manager` [ RunTime:0.000784s ]
SHOW COLUMNS FROM `tp_manager` [ RunTime:0.000778s ]
SHOW COLUMNS FROM `tp_manager` [ RunTime:0.000770s ]
SHOW COLUMNS FROM `tp_manager` [ RunTime:0.000758s ]
SHOW COLUMNS FROM `tp_manager` [ RunTime:0.000748s ]
SHOW COLUMNS FROM `tp_manager` [ RunTime:0.000762s ]
SHOW COLUMNS FROM `tp_manager` [ RunTime:0.000780s ]
SHOW COLUMNS FROM `tp_manager` [ RunTime:0.000758s ]
SHOW COLUMNS FROM `tp_manager_verify` [ RunTime:0.000775s ]
SHOW COLUMNS FROM `tp_manager_verify` [ RunTime:0.000779s ]
SHOW COLUMNS FROM `tp_manager_verify` [ RunTime:0.000740s ]
SHOW COLUMNS FROM `tp_manager_verify` [ RunTime:0.000753s ]
SHOW COLUMNS FROM `tp_manager_verify` [ RunTime:0.000754s ]
SHOW COLUMNS FROM `tp_manager_verify` [ RunTime:0.000753s ]
SHOW COLUMNS FROM `tp_manager_verify` [ RunTime:0.000745s ]
SHOW COLUMNS FROM `tp_manager_verify` [ RunTime:0.000747s ]
SHOW COLUMNS FROM `tp_manager_verify` [ RunTime:0.000740s ]
SHOW COLUMNS FROM `tp_manager_verify` [ RunTime:0.000747s ]
SHOW COLUMNS FROM `tp_manager_verify` [ RunTime:0.000754s ]
CREATE TABLE IF NOT EXISTS `tp_user_token` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) unsigned NOT NULL DEFAULT 0,
`token` varchar(128) NOT NULL DEFAULT '',
`session_key` varchar(100) NOT NULL DEFAULT '',
`expire_time` int(11) unsigned NOT NULL DEFAULT 0,
`create_time` int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_token` (`token`),
KEY `idx_user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户登录Token表' [ RunTime:0.008078s ]
CREATE TABLE IF NOT EXISTS `tp_h5_subscribe_grant` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) unsigned NOT NULL DEFAULT 0,
`role` varchar(20) NOT NULL DEFAULT '' COMMENT '角色:fighter/player',
`template_id` varchar(128) NOT NULL DEFAULT '' COMMENT 'H5一次性订阅模板ID',
`scene` varchar(32) NOT NULL DEFAULT '' COMMENT '一次性订阅scene',
`grant_token` varchar(64) NOT NULL DEFAULT '' COMMENT '授权记录token',
`status` varchar(20) NOT NULL DEFAULT 'created' COMMENT '状态:created/returned/used/failed/cleared',
`return_url` varchar(500) NOT NULL DEFAULT '' COMMENT '授权返回页',
`detail` text COMMENT '调试详情',
`used_time` int(11) unsigned NOT NULL DEFAULT 0,
`create_time` int(11) unsigned NOT NULL DEFAULT 0,
`update_time` int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_grant_token` (`grant_token`),
KEY `idx_user_role_status` (`user_id`,`role`,`status`),
KEY `idx_scene` (`scene`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='H5一次性订阅授权记录表' [ RunTime:0.006956s ]
SHOW COLUMNS FROM `tp_chat_session` [ RunTime:0.001155s ]
SHOW COLUMNS FROM `tp_chat_session` [ RunTime:0.000899s ]
SHOW COLUMNS FROM `tp_chat_session` [ RunTime:0.000866s ]
SHOW TABLES LIKE 'tp_chat_session' [ RunTime:0.000831s ]
SHOW COLUMNS FROM `tp_chat_message` [ RunTime:0.000906s ]
SHOW COLUMNS FROM `tp_chat_message` [ RunTime:0.000831s ]
SHOW COLUMNS FROM `tp_chat_message` [ RunTime:0.000819s ]
SHOW COLUMNS FROM `tp_chat_message` [ RunTime:0.000803s ]
SHOW COLUMNS FROM `tp_chat_message` [ RunTime:0.000800s ]
CREATE TABLE IF NOT EXISTS `tp_tenant` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '租户ID',
`name` varchar(100) NOT NULL DEFAULT '' COMMENT '租户名称',
`code` varchar(50) NOT NULL DEFAULT '' COMMENT '租户编码',
`contact_name` varchar(50) NOT NULL DEFAULT '' COMMENT '联系人',
`contact_phone` varchar(20) NOT NULL DEFAULT '' COMMENT '联系电话',
`contact_email` varchar(100) NOT NULL DEFAULT '' COMMENT '联系邮箱',
`logo` varchar(500) NOT NULL DEFAULT '' COMMENT 'Logo',
`expire_time` int(11) unsigned NOT NULL DEFAULT 0 COMMENT '到期时间',
`max_users` int(11) NOT NULL DEFAULT 0 COMMENT '最大用户数',
`max_fighters` int(11) NOT NULL DEFAULT 0 COMMENT '最大打手数',
`max_players` int(11) NOT NULL DEFAULT 0 COMMENT '最大陪玩数',
`status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态:0禁用1正常2试用',
`remark` varchar(500) NOT NULL DEFAULT '' COMMENT '备注',
`config` text COMMENT '个性化配置JSON',
`create_time` int(11) unsigned NOT NULL DEFAULT 0,
`update_time` int(11) unsigned NOT NULL DEFAULT 0,
`delete_time` int(11) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_code` (`code`),
KEY `idx_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='租户主表' [ RunTime:0.007385s ]
CREATE TABLE IF NOT EXISTS `tp_tenant_domain` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`tenant_id` int(11) unsigned NOT NULL DEFAULT 0 COMMENT '租户ID',
`domain` varchar(255) NOT NULL DEFAULT '' COMMENT '域名',
`is_primary` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否主域名',
`status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态',
`create_time` int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_domain` (`domain`),
KEY `idx_tenant_id` (`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='租户域名映射表' [ RunTime:0.006526s ]
CREATE TABLE IF NOT EXISTS `tp_saas_partner` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`parent_id` int(11) unsigned NOT NULL DEFAULT 0 COMMENT '上级渠道ID',
`partner_type` tinyint(1) NOT NULL DEFAULT 3 COMMENT '3授权商 2代理商',
`username` varchar(50) NOT NULL DEFAULT '' COMMENT '登录账号',
`password` varchar(255) NOT NULL DEFAULT '' COMMENT '登录密码哈希',
`nickname` varchar(50) NOT NULL DEFAULT '' COMMENT '显示名称',
`phone` varchar(20) NOT NULL DEFAULT '',
`email` varchar(100) NOT NULL DEFAULT '',
`balance` decimal(12,2) NOT NULL DEFAULT 0.00 COMMENT '账户余额',
`status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态 1正常 0禁用',
`remark` varchar(500) NOT NULL DEFAULT '',
`last_login_time` int(11) unsigned NOT NULL DEFAULT 0,
`last_login_ip` varchar(50) NOT NULL DEFAULT '',
`create_time` int(11) unsigned NOT NULL DEFAULT 0,
`update_time` int(11) unsigned NOT NULL DEFAULT 0,
`delete_time` int(11) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_partner_username` (`username`),
KEY `idx_partner_type` (`partner_type`),
KEY `idx_parent_id` (`parent_id`),
KEY `idx_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='SaaS渠道账号(授权商/代理商)' [ RunTime:0.006646s ]
CREATE TABLE IF NOT EXISTS `tp_saas_partner_price` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`partner_id` int(11) unsigned NOT NULL DEFAULT 0 COMMENT '渠道ID',
`package_id` int(11) unsigned NOT NULL DEFAULT 0 COMMENT '套餐ID',
`price` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '渠道价',
`create_time` int(11) unsigned NOT NULL DEFAULT 0,
`update_time` int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_partner_package` (`partner_id`,`package_id`),
KEY `idx_package_id` (`package_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='渠道套餐定价' [ RunTime:0.006557s ]
CREATE TABLE IF NOT EXISTS `tp_saas_partner_balance_log` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`partner_id` int(11) unsigned NOT NULL DEFAULT 0 COMMENT '渠道ID',
`change_value` decimal(12,2) NOT NULL DEFAULT 0.00 COMMENT '变动金额',
`before_balance` decimal(12,2) NOT NULL DEFAULT 0.00 COMMENT '变动前余额',
`after_balance` decimal(12,2) NOT NULL DEFAULT 0.00 COMMENT '变动后余额',
`type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '1充值 2扣减 3下级充值扣减 4下级入账',
`related_id` int(11) unsigned NOT NULL DEFAULT 0 COMMENT '关联ID',
`remark` varchar(500) NOT NULL DEFAULT '',
`operator_id` int(11) unsigned NOT NULL DEFAULT 0,
`operator_type` varchar(20) NOT NULL DEFAULT 'admin',
`create_time` int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `idx_partner_id` (`partner_id`),
KEY `idx_type` (`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='渠道余额流水' [ RunTime:0.006515s ]
SHOW COLUMNS FROM `tp_admin` [ RunTime:0.000950s ]
SHOW COLUMNS FROM `tp_tenant` [ RunTime:0.000856s ]
SHOW COLUMNS FROM `tp_tenant` [ RunTime:0.000822s ]
SHOW COLUMNS FROM `tp_tenant_bill` [ RunTime:0.000846s ]
SHOW COLUMNS FROM `tp_tenant_bill` [ RunTime:0.000798s ]
SHOW COLUMNS FROM `tp_config` [ RunTime:0.000687s ]
SHOW TABLES LIKE 'tp_config' [ RunTime:0.000994s ]
SHOW INDEX FROM `tp_config` [ RunTime:0.000413s ]
SHOW TABLES LIKE 'tp_tenant' [ RunTime:0.000703s ]
SELECT * FROM `tp_tenant` WHERE `id` = 1 LIMIT 1 [ RunTime:0.000478s ]
SHOW TABLES LIKE 'tp_config' [ RunTime:0.000753s ]
SHOW FULL COLUMNS FROM `tp_config` [ RunTime:0.000775s ]
SELECT `value`,`name` FROM `tp_config` WHERE `tenant_id` = 1 AND `name` IN ('site_name','site_logo','site_favicon','site_notice','icp_number','contact_phone','contact_email') [ RunTime:0.000615s ]
SHOW TABLES LIKE 'tp_config' [ RunTime:0.000770s ]
SELECT `value`,`name` FROM `tp_config` WHERE `tenant_id` = 1 AND `name` IN ('player_enabled','fighter_enabled','merchant_enabled','manager_enabled') [ RunTime:0.000470s ]
SHOW TABLES LIKE 'tp_decorate' [ RunTime:0.000748s ]
SHOW FULL COLUMNS FROM `tp_decorate` [ RunTime:0.000822s ]
SELECT * FROM `tp_decorate` WHERE `tenant_id` = 1 AND `status` = 1 AND `type` = 'banner' ORDER BY `sort` DESC [ RunTime:0.000534s ]
SHOW TABLES LIKE 'tp_game' [ RunTime:0.000785s ]
SHOW FULL COLUMNS FROM `tp_game` [ RunTime:0.000831s ]
SHOW COLUMNS FROM `tp_game` LIKE 'delete_time' [ RunTime:0.000627s ]
SELECT * FROM `tp_game` WHERE `tenant_id` = 1 AND `status` = 1 AND `delete_time` IS NULL ORDER BY `sort` ASC LIMIT 8 [ RunTime:0.000477s ]
SHOW TABLES LIKE 'tp_service' [ RunTime:0.000761s ]
SHOW FULL COLUMNS FROM `tp_service` [ RunTime:0.000930s ]
SHOW COLUMNS FROM `tp_service` LIKE 'delete_time' [ RunTime:0.000632s ]
SELECT `s`.*,g.name as game_name FROM `tp_service` `s` LEFT JOIN `tp_game` `g` ON `s`.`game_id`=`g`.`id` WHERE `tenant_id` = '1' AND `s`.`status` = '1' AND `s`.`delete_time` IS NULL ORDER BY `s`.`sort` ASC LIMIT 6 [ RunTime:0.000715s ]
SHOW COLUMNS FROM `tp_service` LIKE 'delete_time' [ RunTime:0.000667s ]