Files
kra-new/internal/data/swmigration/testdata/legacy-schema.sql
T

1673 lines
78 KiB
SQL

-- Sanitized legacy storage contract. Contains no production rows or credentials.
CREATE TABLE `gen_table` (
`table_id` bigint(20) NOT NULL,
`data_name` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT '',
`table_name` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT '',
`table_comment` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT '',
`class_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '',
`tpl_category` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT 'crud',
`frontend_type` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT 'vue',
`package_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`module_name` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`business_name` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`function_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`function_author` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`gen_type` char(1) COLLATE utf8mb4_unicode_ci DEFAULT '0',
`gen_path` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT '/',
`options` varchar(1000) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`create_dept` bigint(20) DEFAULT NULL,
`create_by` bigint(20) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`update_by` bigint(20) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`remark` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
PRIMARY KEY (`table_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `gen_table_column` (
`column_id` bigint(20) NOT NULL,
`table_id` bigint(20) DEFAULT NULL,
`column_name` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`column_comment` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`column_type` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`java_type` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`java_field` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_pk` char(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_increment` char(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_required` char(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_insert` char(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_edit` char(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_list` char(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_query` char(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`query_type` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT 'EQ',
`html_type` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`dict_type` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT '',
`sort` int(11) DEFAULT NULL,
`create_dept` bigint(20) DEFAULT NULL,
`create_by` bigint(20) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`update_by` bigint(20) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
PRIMARY KEY (`column_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `sj_distributed_lock` (
`name` varchar(64) NOT NULL,
`lock_until` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3),
`locked_at` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
`locked_by` varchar(255) NOT NULL,
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `sj_group_config` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
`group_name` varchar(64) NOT NULL DEFAULT '',
`description` varchar(256) NOT NULL DEFAULT '',
`token` varchar(64) NOT NULL DEFAULT 'fixture-secret',
`group_status` tinyint(4) NOT NULL DEFAULT '0',
`version` int(11) NOT NULL,
`group_partition` int(11) NOT NULL,
`id_generator_mode` tinyint(4) NOT NULL DEFAULT '1',
`init_scene` tinyint(4) NOT NULL DEFAULT '0',
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_namespace_id_group_name` (`namespace_id`,`group_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `sj_job` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
`biz_id` varchar(64) NOT NULL,
`group_name` varchar(64) NOT NULL,
`job_name` varchar(64) NOT NULL,
`args_str` text,
`args_type` tinyint(4) NOT NULL DEFAULT '1',
`next_trigger_at` bigint(13) NOT NULL,
`job_status` tinyint(4) NOT NULL DEFAULT '1',
`task_type` tinyint(4) NOT NULL DEFAULT '1',
`route_key` tinyint(4) NOT NULL DEFAULT '4',
`executor_type` tinyint(4) NOT NULL DEFAULT '1',
`executor_info` varchar(255) DEFAULT NULL,
`trigger_type` tinyint(4) NOT NULL,
`trigger_interval` varchar(255) NOT NULL,
`block_strategy` tinyint(4) NOT NULL DEFAULT '1',
`executor_timeout` int(11) NOT NULL DEFAULT '0',
`max_retry_times` int(11) NOT NULL DEFAULT '0',
`parallel_num` int(11) NOT NULL DEFAULT '1',
`retry_interval` int(11) NOT NULL DEFAULT '0',
`bucket_index` int(11) NOT NULL DEFAULT '0',
`resident` tinyint(4) NOT NULL DEFAULT '0',
`notify_ids` varchar(128) NOT NULL DEFAULT '',
`owner_id` bigint(20) DEFAULT NULL,
`labels` varchar(512) DEFAULT '',
`description` varchar(256) NOT NULL DEFAULT '',
`ext_attrs` varchar(256) DEFAULT '',
`deleted` tinyint(4) NOT NULL DEFAULT '0',
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_sj_job_01` (`namespace_id`,`biz_id`),
KEY `idx_namespace_id_group_name` (`namespace_id`,`group_name`),
KEY `idx_job_status_bucket_index` (`job_status`,`bucket_index`),
KEY `idx_create_dt` (`create_dt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `sj_job_executor` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
`group_name` varchar(64) NOT NULL,
`executor_info` varchar(256) NOT NULL,
`executor_type` varchar(3) NOT NULL,
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `idx_namespace_id_group_name` (`namespace_id`,`group_name`),
KEY `idx_create_dt` (`create_dt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `sj_job_log_message` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
`group_name` varchar(64) NOT NULL,
`job_id` bigint(20) NOT NULL,
`task_batch_id` bigint(20) NOT NULL,
`task_id` bigint(20) NOT NULL,
`message` longtext NOT NULL,
`log_num` int(11) NOT NULL DEFAULT '1',
`real_time` bigint(13) NOT NULL DEFAULT '0',
`ext_attrs` varchar(256) DEFAULT '',
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `idx_task_batch_id_task_id` (`task_batch_id`,`task_id`),
KEY `idx_create_dt` (`create_dt`),
KEY `idx_namespace_id_group_name` (`namespace_id`,`group_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `sj_job_summary` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
`group_name` varchar(64) NOT NULL DEFAULT '',
`business_id` bigint(20) NOT NULL,
`system_task_type` tinyint(4) NOT NULL DEFAULT '3',
`trigger_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`success_num` int(11) NOT NULL DEFAULT '0',
`fail_num` int(11) NOT NULL DEFAULT '0',
`fail_reason` varchar(512) NOT NULL DEFAULT '',
`stop_num` int(11) NOT NULL DEFAULT '0',
`stop_reason` varchar(512) NOT NULL DEFAULT '',
`cancel_num` int(11) NOT NULL DEFAULT '0',
`cancel_reason` varchar(512) NOT NULL DEFAULT '',
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_trigger_at_system_task_type_business_id` (`trigger_at`,`system_task_type`,`business_id`) USING BTREE,
KEY `idx_namespace_id_group_name_business_id` (`namespace_id`,`group_name`,`business_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `sj_job_task` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
`group_name` varchar(64) NOT NULL,
`job_id` bigint(20) NOT NULL,
`task_batch_id` bigint(20) NOT NULL,
`parent_id` bigint(20) NOT NULL DEFAULT '0',
`task_status` tinyint(4) NOT NULL DEFAULT '0',
`retry_count` int(11) NOT NULL DEFAULT '0',
`mr_stage` tinyint(4) DEFAULT NULL,
`leaf` tinyint(4) NOT NULL DEFAULT '1',
`task_name` varchar(255) NOT NULL DEFAULT '',
`client_info` varchar(128) DEFAULT NULL,
`wf_context` text,
`result_message` text NOT NULL,
`args_str` text,
`args_type` tinyint(4) NOT NULL DEFAULT '1',
`ext_attrs` varchar(256) DEFAULT '',
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `idx_task_batch_id_task_status` (`task_batch_id`,`task_status`),
KEY `idx_create_dt` (`create_dt`),
KEY `idx_namespace_id_group_name` (`namespace_id`,`group_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `sj_job_task_batch` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
`group_name` varchar(64) NOT NULL,
`job_id` bigint(20) NOT NULL,
`workflow_node_id` bigint(20) NOT NULL DEFAULT '0',
`parent_workflow_node_id` bigint(20) NOT NULL DEFAULT '0',
`workflow_task_batch_id` bigint(20) NOT NULL DEFAULT '0',
`task_batch_status` tinyint(4) NOT NULL DEFAULT '0',
`operation_reason` tinyint(4) NOT NULL DEFAULT '0',
`execution_at` bigint(13) NOT NULL DEFAULT '0',
`system_task_type` tinyint(4) NOT NULL DEFAULT '3',
`parent_id` varchar(64) NOT NULL DEFAULT '',
`ext_attrs` varchar(256) DEFAULT '',
`deleted` tinyint(4) NOT NULL DEFAULT '0',
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `idx_job_id_task_batch_status` (`job_id`,`task_batch_status`),
KEY `idx_create_dt` (`create_dt`),
KEY `idx_namespace_id_group_name` (`namespace_id`,`group_name`),
KEY `idx_workflow_task_batch_id_workflow_node_id` (`workflow_task_batch_id`,`workflow_node_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `sj_namespace` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL,
`unique_id` varchar(64) NOT NULL,
`description` varchar(256) NOT NULL DEFAULT '',
`deleted` tinyint(4) NOT NULL DEFAULT '0',
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_unique_id` (`unique_id`),
KEY `idx_name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `sj_notify_config` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
`group_name` varchar(64) NOT NULL,
`notify_name` varchar(64) NOT NULL DEFAULT '',
`system_task_type` tinyint(4) NOT NULL DEFAULT '3',
`notify_status` tinyint(4) NOT NULL DEFAULT '0',
`recipient_ids` varchar(128) NOT NULL,
`notify_threshold` int(11) NOT NULL DEFAULT '0',
`notify_scene` tinyint(4) NOT NULL DEFAULT '0',
`rate_limiter_status` tinyint(4) NOT NULL DEFAULT '0',
`rate_limiter_threshold` int(11) NOT NULL DEFAULT '0',
`description` varchar(256) NOT NULL DEFAULT '',
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `idx_namespace_id_group_name_scene_name` (`namespace_id`,`group_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `sj_notify_recipient` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
`recipient_name` varchar(64) NOT NULL,
`notify_type` tinyint(4) NOT NULL DEFAULT '0',
`notify_attribute` varchar(512) NOT NULL,
`description` varchar(256) NOT NULL DEFAULT '',
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `idx_namespace_id` (`namespace_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `sj_retry` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
`group_name` varchar(64) NOT NULL,
`group_id` bigint(20) NOT NULL,
`scene_name` varchar(64) NOT NULL,
`scene_id` bigint(20) NOT NULL,
`idempotent_id` varchar(64) NOT NULL,
`biz_no` varchar(64) NOT NULL DEFAULT '',
`executor_name` varchar(512) NOT NULL DEFAULT '',
`args_str` text NOT NULL,
`ext_attrs` text NOT NULL,
`serializer_name` varchar(32) NOT NULL DEFAULT 'jackson',
`next_trigger_at` bigint(13) NOT NULL,
`retry_count` int(11) NOT NULL DEFAULT '0',
`retry_status` tinyint(4) NOT NULL DEFAULT '0',
`task_type` tinyint(4) NOT NULL DEFAULT '1',
`bucket_index` int(11) NOT NULL DEFAULT '0',
`parent_id` bigint(20) NOT NULL DEFAULT '0',
`deleted` bigint(20) NOT NULL DEFAULT '0',
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_scene_tasktype_idempotentid_deleted` (`scene_id`,`task_type`,`idempotent_id`,`deleted`),
KEY `idx_biz_no` (`biz_no`),
KEY `idx_idempotent_id` (`idempotent_id`),
KEY `idx_retry_status_bucket_index` (`retry_status`,`bucket_index`),
KEY `idx_parent_id` (`parent_id`),
KEY `idx_create_dt` (`create_dt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `sj_retry_dead_letter` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
`group_name` varchar(64) NOT NULL,
`group_id` bigint(20) NOT NULL,
`scene_name` varchar(64) NOT NULL,
`scene_id` bigint(20) NOT NULL,
`idempotent_id` varchar(64) NOT NULL,
`biz_no` varchar(64) NOT NULL DEFAULT '',
`executor_name` varchar(512) NOT NULL DEFAULT '',
`serializer_name` varchar(32) NOT NULL DEFAULT 'jackson',
`args_str` text NOT NULL,
`ext_attrs` text NOT NULL,
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `idx_namespace_id_group_name_scene_name` (`namespace_id`,`group_name`,`scene_name`),
KEY `idx_idempotent_id` (`idempotent_id`),
KEY `idx_biz_no` (`biz_no`),
KEY `idx_create_dt` (`create_dt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `sj_retry_scene_config` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
`scene_name` varchar(64) NOT NULL,
`group_name` varchar(64) NOT NULL,
`scene_status` tinyint(4) NOT NULL DEFAULT '0',
`max_retry_count` int(11) NOT NULL DEFAULT '5',
`back_off` tinyint(4) NOT NULL DEFAULT '1',
`trigger_interval` varchar(16) NOT NULL DEFAULT '',
`notify_ids` varchar(128) NOT NULL DEFAULT '',
`deadline_request` bigint(20) unsigned NOT NULL DEFAULT '60000',
`executor_timeout` int(11) unsigned NOT NULL DEFAULT '5',
`route_key` tinyint(4) NOT NULL DEFAULT '4',
`block_strategy` tinyint(4) NOT NULL DEFAULT '1',
`cb_status` tinyint(4) NOT NULL DEFAULT '0',
`cb_trigger_type` tinyint(4) NOT NULL DEFAULT '1',
`cb_max_count` int(11) NOT NULL DEFAULT '16',
`cb_trigger_interval` varchar(16) NOT NULL DEFAULT '',
`owner_id` bigint(20) DEFAULT NULL,
`labels` varchar(512) DEFAULT '',
`description` varchar(256) NOT NULL DEFAULT '',
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_namespace_id_group_name_scene_name` (`namespace_id`,`group_name`,`scene_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `sj_retry_summary` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
`group_name` varchar(64) NOT NULL DEFAULT '',
`scene_name` varchar(64) NOT NULL DEFAULT '',
`trigger_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`running_num` int(11) NOT NULL DEFAULT '0',
`finish_num` int(11) NOT NULL DEFAULT '0',
`max_count_num` int(11) NOT NULL DEFAULT '0',
`suspend_num` int(11) NOT NULL DEFAULT '0',
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_scene_name_trigger_at` (`namespace_id`,`group_name`,`scene_name`,`trigger_at`) USING BTREE,
KEY `idx_trigger_at` (`trigger_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `sj_retry_task` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
`group_name` varchar(64) NOT NULL,
`scene_name` varchar(64) NOT NULL,
`retry_id` bigint(20) NOT NULL,
`ext_attrs` text NOT NULL,
`task_status` tinyint(4) NOT NULL DEFAULT '1',
`task_type` tinyint(4) NOT NULL DEFAULT '1',
`operation_reason` tinyint(4) NOT NULL DEFAULT '0',
`client_info` varchar(128) DEFAULT NULL,
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `idx_group_name_scene_name` (`namespace_id`,`group_name`,`scene_name`),
KEY `task_status` (`task_status`),
KEY `idx_create_dt` (`create_dt`),
KEY `idx_retry_id` (`retry_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `sj_retry_task_log_message` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
`group_name` varchar(64) NOT NULL,
`retry_id` bigint(20) NOT NULL,
`retry_task_id` bigint(20) NOT NULL,
`message` longtext NOT NULL,
`log_num` int(11) NOT NULL DEFAULT '1',
`real_time` bigint(13) NOT NULL DEFAULT '0',
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `idx_namespace_id_group_name_retry_task_id` (`namespace_id`,`group_name`,`retry_task_id`),
KEY `idx_create_dt` (`create_dt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `sj_server_node` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
`group_name` varchar(64) NOT NULL,
`host_id` varchar(64) NOT NULL,
`host_ip` varchar(64) NOT NULL,
`host_port` int(16) NOT NULL,
`expire_at` datetime NOT NULL,
`node_type` tinyint(4) NOT NULL,
`ext_attrs` varchar(256) DEFAULT '',
`labels` varchar(512) DEFAULT '',
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_host_id_host_ip` (`host_id`,`host_ip`),
KEY `idx_namespace_id_group_name` (`namespace_id`,`group_name`),
KEY `idx_expire_at_node_type` (`expire_at`,`node_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `sj_system_user` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(64) NOT NULL,
`password` varchar(128) NOT NULL,
`role` tinyint(4) NOT NULL DEFAULT '0',
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_username` (`username`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `sj_system_user_permission` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`group_name` varchar(64) NOT NULL,
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
`system_user_id` bigint(20) NOT NULL,
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_namespace_id_group_name_system_user_id` (`namespace_id`,`group_name`,`system_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `sj_workflow` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`workflow_name` varchar(64) NOT NULL,
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
`biz_id` varchar(64) NOT NULL,
`group_name` varchar(64) NOT NULL,
`workflow_status` tinyint(4) NOT NULL DEFAULT '1',
`trigger_type` tinyint(4) NOT NULL,
`trigger_interval` varchar(255) NOT NULL,
`next_trigger_at` bigint(20) NOT NULL,
`block_strategy` tinyint(4) NOT NULL DEFAULT '1',
`executor_timeout` int(11) NOT NULL DEFAULT '0',
`description` varchar(256) NOT NULL DEFAULT '',
`flow_info` text,
`wf_context` text,
`notify_ids` varchar(128) NOT NULL DEFAULT '',
`bucket_index` int(11) NOT NULL DEFAULT '0',
`version` int(11) NOT NULL,
`owner_id` bigint(20) DEFAULT NULL,
`ext_attrs` varchar(256) DEFAULT '',
`deleted` tinyint(4) NOT NULL DEFAULT '0',
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_sj_workflow_01` (`namespace_id`,`biz_id`),
KEY `idx_create_dt` (`create_dt`),
KEY `idx_namespace_id_group_name` (`namespace_id`,`group_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `sj_workflow_node` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
`node_name` varchar(64) NOT NULL,
`group_name` varchar(64) NOT NULL,
`job_id` bigint(20) NOT NULL,
`workflow_id` bigint(20) NOT NULL,
`node_type` tinyint(4) NOT NULL DEFAULT '1',
`expression_type` tinyint(4) NOT NULL DEFAULT '0',
`fail_strategy` tinyint(4) NOT NULL DEFAULT '1',
`workflow_node_status` tinyint(4) NOT NULL DEFAULT '1',
`priority_level` int(11) NOT NULL DEFAULT '1',
`node_info` text,
`version` int(11) NOT NULL,
`ext_attrs` varchar(256) DEFAULT '',
`deleted` tinyint(4) NOT NULL DEFAULT '0',
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `idx_create_dt` (`create_dt`),
KEY `idx_namespace_id_group_name` (`namespace_id`,`group_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `sj_workflow_task_batch` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`namespace_id` varchar(64) NOT NULL DEFAULT '764d604ec6fc45f68cd92514c40e9e1a',
`group_name` varchar(64) NOT NULL,
`workflow_id` bigint(20) NOT NULL,
`task_batch_status` tinyint(4) NOT NULL DEFAULT '0',
`operation_reason` tinyint(4) NOT NULL DEFAULT '0',
`flow_info` text,
`wf_context` text,
`execution_at` bigint(13) NOT NULL DEFAULT '0',
`ext_attrs` varchar(256) DEFAULT '',
`version` int(11) NOT NULL DEFAULT '1',
`deleted` tinyint(4) NOT NULL DEFAULT '0',
`create_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `idx_job_id_task_batch_status` (`workflow_id`,`task_batch_status`),
KEY `idx_create_dt` (`create_dt`),
KEY `idx_namespace_id_group_name` (`namespace_id`,`group_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `sys_alert_dedup_bak_20261020_105142_128391_5084329` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`platform_code` varchar(50) DEFAULT NULL,
`platform_name` varchar(50) NOT NULL,
`rule_id` bigint(20) NOT NULL,
`rule_name` varchar(100) NOT NULL,
`rule_type` varchar(50) DEFAULT NULL,
`monitor_metric` tinyint(4) DEFAULT NULL,
`target_promote_id` bigint(20) NOT NULL,
`target_promote_name` varchar(100) NOT NULL,
`business_id` bigint(20) NOT NULL,
`business_name` varchar(100) NOT NULL,
`alert_content` text NOT NULL,
`status` tinyint(4) NOT NULL DEFAULT '1',
`alert_date` date NOT NULL,
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `uk_alert_record_daily` (`platform_code`,`target_promote_id`,`rule_id`,`alert_date`) USING BTREE,
KEY `idx_business_id` (`business_id`) USING BTREE,
KEY `idx_platform_id` (`platform_code`) USING BTREE,
KEY `idx_status` (`status`) USING BTREE,
KEY `idx_created_at` (`created_at`) USING BTREE,
KEY `idx_rule_promote_created` (`rule_id`,`target_promote_id`,`created_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
CREATE TABLE `sys_alert_dedup_bak_20261020_111958_265207_5085137` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`platform_code` varchar(50) DEFAULT NULL,
`platform_name` varchar(50) NOT NULL,
`rule_id` bigint(20) NOT NULL,
`rule_name` varchar(100) NOT NULL,
`rule_type` varchar(50) DEFAULT NULL,
`monitor_metric` tinyint(4) DEFAULT NULL,
`target_promote_id` bigint(20) NOT NULL,
`target_promote_name` varchar(100) NOT NULL,
`business_id` bigint(20) NOT NULL,
`business_name` varchar(100) NOT NULL,
`alert_content` text NOT NULL,
`status` tinyint(4) NOT NULL DEFAULT '1',
`alert_date` date NOT NULL,
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `uk_alert_record_daily` (`platform_code`,`target_promote_id`,`rule_id`,`alert_date`) USING BTREE,
KEY `idx_business_id` (`business_id`) USING BTREE,
KEY `idx_platform_id` (`platform_code`) USING BTREE,
KEY `idx_status` (`status`) USING BTREE,
KEY `idx_created_at` (`created_at`) USING BTREE,
KEY `idx_rule_promote_created` (`rule_id`,`target_promote_id`,`created_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
CREATE TABLE `sys_alert_operation_log` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`alert_id` bigint(20) unsigned NOT NULL,
`operator_id` bigint(20) NOT NULL,
`operator_name` varchar(50) NOT NULL,
`log_type` tinyint(4) NOT NULL,
`action_detail` varchar(100) DEFAULT NULL,
`note_content` text,
`attachment_ids` json DEFAULT NULL,
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_alert_id` (`alert_id`) USING BTREE,
KEY `idx_created_at` (`created_at`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
CREATE TABLE `sys_alert_record` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`platform_code` varchar(50) DEFAULT NULL,
`platform_name` varchar(50) NOT NULL,
`rule_id` bigint(20) NOT NULL,
`rule_name` varchar(100) NOT NULL,
`rule_type` varchar(50) DEFAULT NULL,
`monitor_metric` tinyint(4) DEFAULT NULL,
`target_promote_id` bigint(20) NOT NULL,
`target_promote_name` varchar(100) NOT NULL,
`business_id` bigint(20) NOT NULL,
`business_name` varchar(100) NOT NULL,
`alert_content` text NOT NULL,
`status` tinyint(4) NOT NULL DEFAULT '1',
`alert_date` date NOT NULL,
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`unclosed_flag` tinyint(4) GENERATED ALWAYS AS ((case when (`status` = 5) then NULL else 1 end)) STORED,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `uk_alert_record_unclosed` (`platform_code`,`target_promote_id`,`rule_type`,`unclosed_flag`),
KEY `idx_business_id` (`business_id`) USING BTREE,
KEY `idx_platform_id` (`platform_code`) USING BTREE,
KEY `idx_status` (`status`) USING BTREE,
KEY `idx_created_at` (`created_at`) USING BTREE,
KEY `idx_rule_promote_created` (`rule_id`,`target_promote_id`,`created_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
CREATE TABLE `sys_alert_rule` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`rule_name` varchar(100) NOT NULL,
`rule_type` varchar(50) NOT NULL,
`monitor_metric` tinyint(4) NOT NULL,
`stat_period_days` int(11) DEFAULT NULL,
`mom_direction` tinyint(4) DEFAULT NULL,
`mom_threshold` decimal(5,2) DEFAULT NULL,
`unlogin_days` int(11) DEFAULT NULL,
`monitor_scope` tinyint(4) NOT NULL DEFAULT '1',
`warning_color` varchar(20) NOT NULL,
`creator_id` bigint(20) NOT NULL,
`enabled` tinyint(1) NOT NULL DEFAULT '1',
`is_deleted` tinyint(1) NOT NULL DEFAULT '0',
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_creator_id` (`creator_id`) USING BTREE,
KEY `idx_rule_type` (`rule_type`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
CREATE TABLE `sys_client` (
`id` bigint(20) NOT NULL,
`client_id` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`client_key` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`client_secret` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`grant_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`device_type` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`access_path` varchar(2000) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`ip_whitelist` varchar(1000) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`active_timeout` int(11) DEFAULT '1800',
`timeout` int(11) DEFAULT '604800',
`status` char(1) COLLATE utf8mb4_unicode_ci DEFAULT '0',
`del_flag` char(1) COLLATE utf8mb4_unicode_ci DEFAULT '0',
`create_dept` bigint(20) DEFAULT NULL,
`create_by` bigint(20) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`update_by` bigint(20) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `sys_config` (
`config_id` bigint(20) NOT NULL,
`config_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '',
`config_key` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '',
`config_value` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT '',
`config_type` char(1) COLLATE utf8mb4_unicode_ci DEFAULT 'N',
`create_dept` bigint(20) DEFAULT NULL,
`create_by` bigint(20) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`update_by` bigint(20) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`remark` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
PRIMARY KEY (`config_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `sys_dept` (
`dept_id` bigint(20) NOT NULL,
`parent_id` bigint(20) DEFAULT '0',
`ancestors` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT '',
`dept_name` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '',
`dept_category` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`order_num` int(4) DEFAULT '0',
`leader` bigint(20) DEFAULT NULL,
`phone` varchar(11) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`email` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`status` char(1) COLLATE utf8mb4_unicode_ci DEFAULT '0',
`del_flag` char(1) COLLATE utf8mb4_unicode_ci DEFAULT '0',
`create_dept` bigint(20) DEFAULT NULL,
`create_by` bigint(20) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`update_by` bigint(20) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
PRIMARY KEY (`dept_id`),
KEY `idx_sys_dept_parent_id` (`parent_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `sys_dict_data` (
`dict_code` bigint(20) NOT NULL,
`dict_sort` int(4) DEFAULT '0',
`dict_label` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '',
`dict_value` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '',
`dict_type` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '',
`css_class` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`list_class` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_default` char(1) COLLATE utf8mb4_unicode_ci DEFAULT 'N',
`create_dept` bigint(20) DEFAULT NULL,
`create_by` bigint(20) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`update_by` bigint(20) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`remark` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
PRIMARY KEY (`dict_code`),
KEY `idx_sys_dict_data_type` (`dict_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `sys_dict_type` (
`dict_id` bigint(20) NOT NULL,
`dict_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '',
`dict_type` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '',
`create_dept` bigint(20) DEFAULT NULL,
`create_by` bigint(20) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`update_by` bigint(20) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`remark` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
PRIMARY KEY (`dict_id`),
UNIQUE KEY `dict_type` (`dict_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `sys_login_info` (
`info_id` bigint(20) NOT NULL,
`user_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '',
`client_key` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT '',
`device_type` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT '',
`ipaddr` varchar(128) COLLATE utf8mb4_unicode_ci DEFAULT '',
`login_location` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`browser` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '',
`os` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '',
`status` char(1) COLLATE utf8mb4_unicode_ci DEFAULT '0',
`msg` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`login_time` datetime DEFAULT NULL,
PRIMARY KEY (`info_id`),
KEY `idx_sys_login_info_s` (`status`),
KEY `idx_sys_login_info_lt` (`login_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `sys_menu` (
`menu_id` bigint(20) NOT NULL,
`menu_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`parent_id` bigint(20) DEFAULT '0',
`order_num` int(4) DEFAULT '0',
`path` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT '',
`component` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`query_param` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`is_frame` char(1) COLLATE utf8mb4_unicode_ci DEFAULT 'N',
`is_cache` char(1) COLLATE utf8mb4_unicode_ci DEFAULT 'Y',
`menu_type` char(1) COLLATE utf8mb4_unicode_ci DEFAULT '',
`visible` char(1) COLLATE utf8mb4_unicode_ci DEFAULT '0',
`status` char(1) COLLATE utf8mb4_unicode_ci DEFAULT '0',
`perms` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`icon` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '#',
`active_menu` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`ext` varchar(2000) COLLATE utf8mb4_unicode_ci DEFAULT '',
`create_dept` bigint(20) DEFAULT NULL,
`create_by` bigint(20) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`update_by` bigint(20) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`remark` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT '',
PRIMARY KEY (`menu_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `sys_message` (
`message_id` bigint(20) NOT NULL,
`category` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
`type` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
`source` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
`title` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '',
`message` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT '',
`content` longtext COLLATE utf8mb4_unicode_ci,
`data_json` longtext COLLATE utf8mb4_unicode_ci,
`path` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`send_user_ids` varchar(2000) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0',
`create_dept` bigint(20) DEFAULT NULL,
`create_by` bigint(20) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`update_by` bigint(20) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
PRIMARY KEY (`message_id`),
KEY `idx_sys_message_category_time` (`category`,`create_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `sys_notice` (
`notice_id` bigint(20) NOT NULL,
`notice_title` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`notice_type` char(1) COLLATE utf8mb4_unicode_ci NOT NULL,
`notice_content` longblob,
`status` char(1) COLLATE utf8mb4_unicode_ci DEFAULT '0',
`create_dept` bigint(20) DEFAULT NULL,
`create_by` bigint(20) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`update_by` bigint(20) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`remark` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
PRIMARY KEY (`notice_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `sys_oper_log` (
`oper_id` bigint(20) NOT NULL,
`title` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '',
`business_type` int(2) DEFAULT '0',
`method` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '',
`request_method` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT '',
`operator_type` int(1) DEFAULT '0',
`oper_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '',
`user_id` bigint(20) DEFAULT NULL,
`dept_id` bigint(20) DEFAULT NULL,
`dept_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '',
`client_key` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT '',
`device_type` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT '',
`browser` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '',
`os` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '',
`oper_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`oper_ip` varchar(128) COLLATE utf8mb4_unicode_ci DEFAULT '',
`oper_location` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`oper_param` varchar(4000) COLLATE utf8mb4_unicode_ci DEFAULT '',
`json_result` varchar(4000) COLLATE utf8mb4_unicode_ci DEFAULT '',
`status` int(1) DEFAULT '0',
`error_msg` varchar(4000) COLLATE utf8mb4_unicode_ci DEFAULT '',
`oper_time` datetime DEFAULT NULL,
`cost_time` bigint(20) DEFAULT '0',
PRIMARY KEY (`oper_id`),
KEY `idx_sys_oper_log_bt` (`business_type`),
KEY `idx_sys_oper_log_uid` (`user_id`),
KEY `idx_sys_oper_log_s` (`status`),
KEY `idx_sys_oper_log_ot` (`oper_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `sys_oss` (
`oss_id` bigint(20) NOT NULL,
`file_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`original_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`file_suffix` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`url` varchar(500) COLLATE utf8mb4_unicode_ci NOT NULL,
`ext1` text COLLATE utf8mb4_unicode_ci,
`create_dept` bigint(20) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`create_by` bigint(20) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`update_by` bigint(20) DEFAULT NULL,
`service` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'minio',
PRIMARY KEY (`oss_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `sys_oss_config` (
`oss_config_id` bigint(20) NOT NULL,
`config_key` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`access_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`secret_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`bucket_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`prefix` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`endpoint` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`domain_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`is_https` char(1) COLLATE utf8mb4_unicode_ci DEFAULT 'N',
`region` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`access_policy` char(1) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '1',
`status` char(1) COLLATE utf8mb4_unicode_ci DEFAULT 'N',
`ext1` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`create_dept` bigint(20) DEFAULT NULL,
`create_by` bigint(20) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`update_by` bigint(20) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`remark` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
PRIMARY KEY (`oss_config_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `sys_post` (
`post_id` bigint(20) NOT NULL,
`dept_id` bigint(20) NOT NULL,
`post_code` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
`post_category` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`post_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`post_sort` int(4) NOT NULL,
`status` char(1) COLLATE utf8mb4_unicode_ci NOT NULL,
`del_flag` char(1) COLLATE utf8mb4_unicode_ci DEFAULT '0',
`create_dept` bigint(20) DEFAULT NULL,
`create_by` bigint(20) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`update_by` bigint(20) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`remark` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
PRIMARY KEY (`post_id`),
KEY `idx_sys_post_dept_id` (`dept_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `sys_role` (
`role_id` bigint(20) NOT NULL,
`role_name` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
`role_key` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`role_sort` int(4) NOT NULL,
`data_scope` char(1) COLLATE utf8mb4_unicode_ci DEFAULT '1',
`menu_check_strictly` tinyint(1) DEFAULT '1',
`dept_check_strictly` tinyint(1) DEFAULT '1',
`status` char(1) COLLATE utf8mb4_unicode_ci NOT NULL,
`del_flag` char(1) COLLATE utf8mb4_unicode_ci DEFAULT '0',
`create_dept` bigint(20) DEFAULT NULL,
`create_by` bigint(20) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`update_by` bigint(20) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`remark` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
PRIMARY KEY (`role_id`),
KEY `idx_sys_role_create_dept` (`create_dept`),
KEY `idx_sys_role_create_by` (`create_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `sys_role_dept` (
`role_id` bigint(20) NOT NULL,
`dept_id` bigint(20) NOT NULL,
PRIMARY KEY (`role_id`,`dept_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `sys_role_menu` (
`role_id` bigint(20) NOT NULL,
`menu_id` bigint(20) NOT NULL,
PRIMARY KEY (`role_id`,`menu_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `sys_social` (
`id` bigint(20) NOT NULL,
`user_id` bigint(20) NOT NULL,
`auth_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`source` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`open_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`user_name` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
`nick_name` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '',
`email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`avatar` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT '',
`access_token` varchar(2000) COLLATE utf8mb4_unicode_ci NOT NULL,
`expire_in` int(11) DEFAULT NULL,
`refresh_token` varchar(2000) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`access_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`union_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`scope` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`token_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`id_token` varchar(2000) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`mac_algorithm` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`mac_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`oauth_token` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`oauth_token_secret` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`create_dept` bigint(20) DEFAULT NULL,
`create_by` bigint(20) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`update_by` bigint(20) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`del_flag` char(1) COLLATE utf8mb4_unicode_ci DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `sys_user` (
`user_id` bigint(20) NOT NULL,
`dept_id` bigint(20) DEFAULT NULL,
`user_name` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
`nick_name` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
`user_type` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT 'sys_user',
`email` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '',
`phone_number` varchar(11) COLLATE utf8mb4_unicode_ci DEFAULT '',
`gender` char(1) COLLATE utf8mb4_unicode_ci DEFAULT '0',
`avatar` bigint(20) DEFAULT NULL,
`password` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '',
`status` char(1) COLLATE utf8mb4_unicode_ci DEFAULT '0',
`del_flag` char(1) COLLATE utf8mb4_unicode_ci DEFAULT '0',
`login_ip` varchar(128) COLLATE utf8mb4_unicode_ci DEFAULT '',
`login_date` datetime DEFAULT NULL,
`create_dept` bigint(20) DEFAULT NULL,
`create_by` bigint(20) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`update_by` bigint(20) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`remark` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`level` tinyint(2) unsigned NOT NULL DEFAULT '1',
`parent_id` bigint(20) DEFAULT '0',
`id_path` text CHARACTER SET utf8mb4,
`real_name` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`qq_number` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT '',
`reject_reason` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
PRIMARY KEY (`user_id`),
KEY `idx_sys_user_dept_id` (`dept_id`),
KEY `idx_sys_user_create_by` (`create_by`),
KEY `idx_sys_user_user_name` (`user_name`),
KEY `idx_sys_user_phone` (`phone_number`),
KEY `idx_id_path_level` (`id_path`(100),`level`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `sys_user_bind_platform` (
`user_id` bigint(20) NOT NULL,
`source_db` varchar(10) CHARACTER SET utf8 NOT NULL DEFAULT '',
`platform_busier_id` bigint(20) NOT NULL,
`platform_busier_account` varchar(30) CHARACTER SET utf8 NOT NULL DEFAULT '',
`status` char(1) COLLATE utf8mb4_unicode_ci DEFAULT '3',
`reject_reason` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`review_time` datetime DEFAULT NULL,
`review_account` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
PRIMARY KEY (`user_id`,`source_db`,`platform_busier_id`) USING BTREE,
KEY `idx_user_status` (`user_id`,`status`),
KEY `idx_platform_busier_status` (`platform_busier_id`,`status`,`user_id`),
KEY `idx_user_status_platform` (`user_id`,`status`,`platform_busier_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
CREATE TABLE `sys_user_post` (
`user_id` bigint(20) NOT NULL,
`post_id` bigint(20) NOT NULL,
PRIMARY KEY (`user_id`,`post_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `sys_user_preference` (
`user_id` bigint(20) NOT NULL,
`include_sub_promote` tinyint(1) NOT NULL DEFAULT '1',
`idcard_dedup` tinyint(4) NOT NULL DEFAULT '1',
`update_time` datetime DEFAULT NULL,
PRIMARY KEY (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `sys_user_role` (
`user_id` bigint(20) NOT NULL,
`role_id` bigint(20) NOT NULL,
PRIMARY KEY (`user_id`,`role_id`),
KEY `idx_sys_user_role_rid` (`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `tab_datareport_every_pid` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`time` varchar(20) NOT NULL DEFAULT '',
`promote_id` int(11) NOT NULL DEFAULT '0',
`game_id` int(11) NOT NULL DEFAULT '0',
`new_register_user` text NOT NULL,
`new_register_device` text NOT NULL,
`new_register_device_user` text NOT NULL,
`active_user` text NOT NULL,
`active_user7` text NOT NULL,
`active_user30` text NOT NULL,
`pay_user` text NOT NULL,
`total_order` text NOT NULL,
`total_pay` float(10,2) NOT NULL DEFAULT '0.00',
`new_pay_user` text NOT NULL,
`new_total_order` text NOT NULL,
`new_total_pay` float(10,2) NOT NULL DEFAULT '0.00',
`fire_device` text NOT NULL,
`active_device` text NOT NULL,
`create_time` int(11) NOT NULL DEFAULT '0',
`update_time` int(11) NOT NULL DEFAULT '0',
`source_db` varchar(10) NOT NULL DEFAULT '',
PRIMARY KEY (`id`,`source_db`) USING BTREE,
KEY `time` (`time`) USING BTREE,
KEY `p+t` (`promote_id`,`time`) USING BTREE,
KEY `promote_id` (`time`,`promote_id`,`game_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
CREATE TABLE `tab_datareport_top_pid` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`time` varchar(20) NOT NULL DEFAULT '',
`promote_id` int(11) NOT NULL DEFAULT '0',
`promote_level` tinyint(1) NOT NULL DEFAULT '1',
`game_id` int(11) NOT NULL DEFAULT '0',
`new_register_user` text NOT NULL,
`new_register_device` text NOT NULL,
`new_register_device_user` text NOT NULL,
`active_user` text NOT NULL,
`active_user7` text NOT NULL,
`active_user30` text NOT NULL,
`pay_user` text NOT NULL,
`total_order` text NOT NULL,
`total_pay` float(10,2) NOT NULL DEFAULT '0.00',
`new_pay_user` text NOT NULL,
`new_total_order` text NOT NULL,
`new_total_pay` float(10,2) NOT NULL DEFAULT '0.00',
`fire_device` text NOT NULL,
`active_device` text NOT NULL,
`create_time` int(11) NOT NULL DEFAULT '0',
`update_time` int(11) NOT NULL DEFAULT '0',
`source_db` varchar(10) NOT NULL DEFAULT '',
PRIMARY KEY (`id`,`source_db`) USING BTREE,
KEY `time` (`time`) USING BTREE,
KEY `p+t` (`promote_id`,`time`) USING BTREE,
KEY `promote_id` (`time`,`promote_id`,`game_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
CREATE TABLE `tab_game` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`game_name` varchar(30) NOT NULL DEFAULT '',
`sort` int(10) unsigned NOT NULL DEFAULT '0',
`short` varchar(20) NOT NULL DEFAULT '',
`game_type_id` varchar(50) NOT NULL DEFAULT '0',
`game_type_name` varchar(50) NOT NULL DEFAULT '',
`game_score` double(4,1) NOT NULL DEFAULT '0.0',
`tag_name` varchar(100) NOT NULL DEFAULT '',
`features` varchar(100) NOT NULL DEFAULT '',
`introduction` varchar(1100) NOT NULL DEFAULT '',
`recommend_level` double(3,0) NOT NULL DEFAULT '0',
`apply_status` int(11) NOT NULL DEFAULT '1',
`icon` varchar(100) NOT NULL DEFAULT '',
`cover` varchar(100) NOT NULL DEFAULT '',
`hot_cover` varchar(100) NOT NULL DEFAULT '',
`screenshot` varchar(1000) NOT NULL DEFAULT '',
`groom` varchar(100) NOT NULL DEFAULT '',
`and_dow_address` varchar(100) NOT NULL DEFAULT '',
`ios_dow_plist` varchar(100) NOT NULL DEFAULT '',
`ios_dow_address` varchar(100) NOT NULL DEFAULT '',
`add_game_address` varchar(255) NOT NULL DEFAULT '',
`ios_game_address` varchar(255) NOT NULL DEFAULT '',
`dow_num` int(10) NOT NULL DEFAULT '0',
`recommend_status` varchar(10) NOT NULL DEFAULT '1',
`pay_status` tinyint(2) NOT NULL DEFAULT '1',
`dow_status` tinyint(2) NOT NULL DEFAULT '1',
`create_time` int(11) NOT NULL DEFAULT '0',
`marking` varchar(50) NOT NULL DEFAULT '',
`language` varchar(10) NOT NULL DEFAULT '',
`ratio` decimal(10,2) NOT NULL DEFAULT '0.00',
`money` decimal(10,2) NOT NULL DEFAULT '0.00',
`game_appid` varchar(32) NOT NULL DEFAULT '',
`game_coin_name` varchar(10) NOT NULL DEFAULT '',
`game_coin_ration` varchar(10) NOT NULL DEFAULT '',
`category` tinyint(2) NOT NULL DEFAULT '0',
`sdk_version` tinyint(2) NOT NULL DEFAULT '-1',
`game_status` tinyint(3) unsigned NOT NULL DEFAULT '1',
`relation_game_id` int(11) unsigned NOT NULL DEFAULT '0',
`relation_game_name` varchar(30) NOT NULL DEFAULT '',
`game_size` varchar(10) NOT NULL DEFAULT '0MB',
`material_url` varchar(255) NOT NULL DEFAULT '',
`appstatus` tinyint(2) NOT NULL DEFAULT '0',
`accredit_img` varchar(100) NOT NULL DEFAULT '0',
`back_describe` varchar(50) NOT NULL DEFAULT '',
`dow_icon` varchar(100) NOT NULL DEFAULT '',
`back_map` varchar(100) NOT NULL DEFAULT '0',
`game_address_size` varchar(10) NOT NULL DEFAULT '0',
`down_port` tinyint(1) NOT NULL DEFAULT '1',
`ccustom_service_qq` varchar(11) NOT NULL DEFAULT '',
`is_force_update` tinyint(1) NOT NULL DEFAULT '0',
`display_site` varchar(20) NOT NULL DEFAULT '1,2,3',
`dev_name` varchar(30) NOT NULL DEFAULT '',
`promote_ids` text,
`third_party_url` varchar(800) NOT NULL DEFAULT '',
`screen_type` tinyint(1) NOT NULL DEFAULT '0',
`weiduan_pay_status` tinyint(1) NOT NULL DEFAULT '0',
`fullscreen` tinyint(1) NOT NULL DEFAULT '0',
`is_https` tinyint(1) NOT NULL DEFAULT '0',
`video_cover` varchar(100) NOT NULL DEFAULT '',
`video` text NOT NULL,
`video_url` text NOT NULL,
`load_cover` varchar(100) NOT NULL DEFAULT '',
`is_interflow` tinyint(1) NOT NULL DEFAULT '0',
`is_force_real` tinyint(1) NOT NULL DEFAULT '0',
`first_support_num` int(10) NOT NULL DEFAULT '0',
`following_support_rate` int(10) NOT NULL DEFAULT '0',
`interface_id` int(6) NOT NULL DEFAULT '0',
`cp_game_id` varchar(30) NOT NULL DEFAULT '',
`currency_name` varchar(10) NOT NULL DEFAULT '',
`currency_ratio` int(5) NOT NULL DEFAULT '0',
`cp_id` int(11) unsigned NOT NULL DEFAULT '0',
`vip_table_pic` varchar(100) NOT NULL DEFAULT '',
`sdk_verify` tinyint(1) NOT NULL DEFAULT '0',
`super_version` int(10) NOT NULL DEFAULT '0',
`super_remark` varchar(1000) CHARACTER SET utf8mb4 NOT NULL DEFAULT '',
`update_time` int(10) NOT NULL DEFAULT '0',
`super_version_name` varchar(255) CHARACTER SET utf8mb4 NOT NULL DEFAULT '',
`sdk_scheme` varchar(50) CHARACTER SET utf8mb4 NOT NULL DEFAULT '',
`age_type` tinyint(11) NOT NULL DEFAULT '1',
`age_appid` varchar(255) CHARACTER SET utf8mb4 NOT NULL DEFAULT '',
`age_bizid` varchar(255) CHARACTER SET utf8mb4 NOT NULL DEFAULT '',
`age_key` varchar(255) CHARACTER SET utf8mb4 NOT NULL DEFAULT '',
`age_num` tinyint(4) unsigned DEFAULT '0',
`age_tip` varchar(255) CHARACTER SET utf8mb4 DEFAULT '',
`apple_in_app_set` longtext CHARACTER SET utf8mb4 NOT NULL,
`sdk_area` tinyint(2) NOT NULL DEFAULT '0',
`test_game_status` tinyint(3) unsigned NOT NULL DEFAULT '0',
`simulator_official_status` tinyint(2) NOT NULL DEFAULT '0',
`simulator_channel_status` tinyint(2) NOT NULL DEFAULT '0',
`promote_ids2` text NOT NULL,
`only_for_promote` tinyint(3) unsigned NOT NULL DEFAULT '0',
`yidun_business_id` varchar(100) NOT NULL DEFAULT '',
`platform_id` int(11) NOT NULL DEFAULT '0',
`pc_sdk_game_switch` tinyint(3) unsigned NOT NULL DEFAULT '0',
`pc_sdk_game_config` text NOT NULL,
`pc_repackage_temp_id` bigint(20) NOT NULL DEFAULT '0',
`pc_repackage_game_name` varchar(100) NOT NULL DEFAULT '',
`game_promote_link` varchar(255) NOT NULL DEFAULT '',
`is_open_gm_module_entrance` tinyint(3) unsigned NOT NULL DEFAULT '0',
`opus_ratio` decimal(10,2) unsigned NOT NULL DEFAULT '0.00',
`is_yh` tinyint(3) unsigned NOT NULL DEFAULT '0',
`support_beishu` decimal(10,2) unsigned NOT NULL DEFAULT '0.00',
`support_server` tinyint(3) unsigned NOT NULL DEFAULT '0',
`hzb_pay_status` tinyint(3) unsigned NOT NULL DEFAULT '0',
`auto_check_support` tinyint(1) unsigned NOT NULL DEFAULT '0',
`source_db` varchar(10) NOT NULL DEFAULT '',
PRIMARY KEY (`id`,`source_db`) USING BTREE,
KEY `game_name` (`game_name`) USING BTREE,
KEY `game_appid` (`game_appid`) USING BTREE,
KEY `recommend_status` (`recommend_status`) USING BTREE,
KEY `relation_game_id` (`relation_game_id`) USING BTREE,
KEY `game_type_id` (`game_type_id`) USING BTREE,
KEY `sdk_version` (`sdk_version`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE `tab_game_server` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`game_id` int(11) NOT NULL DEFAULT '0',
`server_name` varchar(30) NOT NULL DEFAULT '',
`server_num` varchar(30) NOT NULL DEFAULT '0',
`status` tinyint(2) NOT NULL DEFAULT '1',
`start_time` int(11) NOT NULL DEFAULT '0',
`desride` varchar(300) NOT NULL DEFAULT '',
`create_time` int(11) NOT NULL DEFAULT '0',
`sdk_version` tinyint(2) NOT NULL DEFAULT '1',
`third_server_id` int(11) NOT NULL DEFAULT '0',
`source_db` varchar(10) NOT NULL DEFAULT '',
PRIMARY KEY (`id`,`source_db`) USING BTREE,
KEY `game_id` (`game_id`) USING BTREE,
KEY `show_status` (`status`) USING BTREE,
KEY `start_time` (`start_time`) USING BTREE,
KEY `create_time` (`create_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE `tab_promote` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`account` varchar(30) NOT NULL DEFAULT '',
`password` varchar(100) CHARACTER SET utf8 NOT NULL DEFAULT '',
`is_edit_password` tinyint(1) NOT NULL DEFAULT '0',
`second_pwd` varchar(100) CHARACTER SET utf8 NOT NULL DEFAULT '',
`id_card_no` varchar(18) NOT NULL DEFAULT '',
`company_name` varchar(100) NOT NULL DEFAULT '',
`company_id_no` varchar(100) NOT NULL DEFAULT '',
`nickname` varchar(30) CHARACTER SET utf8 NOT NULL DEFAULT '',
`mobile_phone` varchar(11) CHARACTER SET utf8 NOT NULL DEFAULT '',
`email` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '',
`real_name` varchar(30) CHARACTER SET utf8 NOT NULL DEFAULT '',
`register_type` tinyint(2) NOT NULL DEFAULT '0',
`pattern` tinyint(2) NOT NULL DEFAULT '0',
`status` int(11) NOT NULL DEFAULT '1',
`lock_status` tinyint(4) NOT NULL DEFAULT '0',
`settment_type` varchar(10) NOT NULL DEFAULT '0',
`bank_name` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '',
`bank_card` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '',
`bank_account` varchar(100) CHARACTER SET utf8 NOT NULL DEFAULT '',
`bank_phone` varchar(11) CHARACTER SET utf8 NOT NULL DEFAULT '',
`bank_area` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
`account_openin` varchar(100) CHARACTER SET utf8 NOT NULL DEFAULT '',
`bank_name_company` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '',
`bank_card_company` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '',
`bank_account_company` varchar(100) CHARACTER SET utf8 NOT NULL DEFAULT '',
`alipay_account` varchar(30) CHARACTER SET utf8 NOT NULL DEFAULT '',
`alipay_name` varchar(30) CHARACTER SET utf8 NOT NULL DEFAULT '',
`money` decimal(10,2) NOT NULL DEFAULT '0.00',
`balance_coin` decimal(10,2) NOT NULL DEFAULT '0.00',
`balance_profit` decimal(10,2) NOT NULL DEFAULT '0.00',
`balance_opus` decimal(10,2) NOT NULL DEFAULT '0.00',
`advance_profit` decimal(10,2) NOT NULL DEFAULT '0.00',
`promote_type` int(2) NOT NULL DEFAULT '1',
`parent_id` int(11) NOT NULL DEFAULT '0',
`parent_name` varchar(30) CHARACTER SET utf8 NOT NULL DEFAULT '',
`promote_level` tinyint(2) NOT NULL DEFAULT '1',
`top_promote_id` int(11) NOT NULL DEFAULT '0',
`last_login_time` int(11) NOT NULL DEFAULT '0',
`create_time` int(11) NOT NULL DEFAULT '0',
`admin_id` int(11) NOT NULL DEFAULT '0',
`mark1` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
`mark2` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
`busier_id` int(10) NOT NULL DEFAULT '0',
`game_ids` varchar(800) CHARACTER SET utf8 NOT NULL DEFAULT '',
`bind_user_id` int(10) NOT NULL DEFAULT '0',
`bind_openid` varchar(100) NOT NULL DEFAULT '',
`bt_welfare_register_auto` tinyint(3) unsigned NOT NULL DEFAULT '0',
`bt_welfare_recharge_auto` tinyint(3) unsigned NOT NULL DEFAULT '0',
`bt_welfare_total_auto` tinyint(3) unsigned NOT NULL DEFAULT '0',
`bt_welfare_month_auto` tinyint(3) unsigned NOT NULL DEFAULT '0',
`bt_welfare_week_auto` tinyint(3) unsigned NOT NULL DEFAULT '0',
`bt_welfare_clock_auto` tinyint(3) unsigned NOT NULL DEFAULT '0',
`bt_welfare_first_recharge_auto` tinyint(3) NOT NULL DEFAULT '0',
`bt_welfare_daily_total_recharge_auto` tinyint(3) NOT NULL DEFAULT '0',
`bt_welfare_transfer_game_auto` tinyint(3) NOT NULL DEFAULT '0',
`bt_welfare_role_level_auto` tinyint(3) NOT NULL DEFAULT '0',
`zfb` varchar(1000) NOT NULL DEFAULT '',
`wxscan` varchar(1000) NOT NULL DEFAULT '',
`wxapp` varchar(500) NOT NULL DEFAULT '',
`is_custom_pay` tinyint(3) NOT NULL DEFAULT '0',
`prepayment` decimal(10,2) NOT NULL DEFAULT '0.00',
`allow_check_subbox` tinyint(3) unsigned NOT NULL DEFAULT '0',
`update_time` int(10) NOT NULL DEFAULT '0',
`oa_studio_id` int(10) unsigned NOT NULL DEFAULT '0',
`game_ids2` text CHARACTER SET utf8 NOT NULL,
`latest_session_id` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
`settlement_day_period` int(8) unsigned NOT NULL DEFAULT '7',
`sms_notice_switch` tinyint(2) NOT NULL DEFAULT '0',
`allow_simulator` tinyint(2) NOT NULL DEFAULT '0',
`cash_money` decimal(10,2) DEFAULT '0.00',
`other_identity` varchar(200) CHARACTER SET utf8 DEFAULT '',
`dy_identifier` varchar(200) CHARACTER SET utf8 DEFAULT '',
`agreement_auth` varchar(255) DEFAULT NULL,
`remarks` varchar(500) DEFAULT NULL,
`is_invitation` tinyint(2) NOT NULL DEFAULT '0',
`id_card_front` varchar(255) NOT NULL DEFAULT '',
`id_card_back` varchar(255) NOT NULL DEFAULT '',
`business_img` varchar(255) NOT NULL DEFAULT '',
`is_risk` tinyint(1) NOT NULL DEFAULT '0',
`ban_wxpay` tinyint(1) NOT NULL DEFAULT '0',
`ban_alipay` tinyint(1) NOT NULL DEFAULT '0',
`work_video` varchar(200) NOT NULL DEFAULT '',
`address` varchar(200) NOT NULL DEFAULT '',
`sign_type` tinyint(4) NOT NULL DEFAULT '0',
`trust_book` varchar(200) NOT NULL DEFAULT '',
`trust_name` varchar(100) NOT NULL DEFAULT '',
`trust_id_card` varchar(18) NOT NULL DEFAULT '',
`trust_job` varchar(30) NOT NULL DEFAULT '',
`source_db` varchar(10) NOT NULL DEFAULT '',
PRIMARY KEY (`id`,`source_db`) USING BTREE,
KEY `account` (`account`) USING BTREE,
KEY `parent_id` (`parent_id`) USING BTREE,
KEY `busier_id` (`busier_id`) USING BTREE,
KEY `top_promote_id` (`top_promote_id`) USING BTREE,
KEY `idx_busier_id` (`busier_id`),
KEY `idx_busier_status` (`busier_id`,`status`,`id`),
KEY `idx_promote_source_busier` (`source_db`,`busier_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
CREATE TABLE `tab_promote_apply` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`game_id` int(11) NOT NULL DEFAULT '0',
`promote_id` int(11) NOT NULL DEFAULT '0',
`apply_time` int(11) NOT NULL DEFAULT '0',
`status` tinyint(2) NOT NULL DEFAULT '0',
`enable_status` tinyint(2) NOT NULL DEFAULT '0',
`pack_url` varchar(500) NOT NULL DEFAULT '',
`plist_url` varchar(500) NOT NULL DEFAULT '',
`dow_url` varchar(500) NOT NULL DEFAULT '',
`dispose_id` int(11) NOT NULL DEFAULT '1',
`dispose_time` int(11) NOT NULL DEFAULT '0',
`sdk_version` tinyint(2) NOT NULL DEFAULT '1',
`promote_ratio` double(5,2) NOT NULL DEFAULT '0.00',
`promote_money` double(5,2) NOT NULL DEFAULT '0.00',
`pack_type` tinyint(1) NOT NULL DEFAULT '0',
`pack_mark` varchar(100) NOT NULL DEFAULT '',
`is_upload` tinyint(1) NOT NULL DEFAULT '0',
`pack_id` int(11) NOT NULL DEFAULT '1',
`pack_time` int(11) NOT NULL DEFAULT '0',
`and_url` varchar(100) NOT NULL DEFAULT '',
`ios_url` varchar(100) NOT NULL DEFAULT '',
`and_status` tinyint(1) NOT NULL DEFAULT '0',
`ios_status` tinyint(1) NOT NULL DEFAULT '0',
`and_upload` tinyint(1) NOT NULL DEFAULT '0',
`ios_upload` tinyint(1) NOT NULL DEFAULT '0',
`cps_alone_show` tinyint(3) unsigned NOT NULL DEFAULT '0',
`add_cps_alone_time` int(11) unsigned NOT NULL DEFAULT '0',
`cpa_alone_show` tinyint(3) unsigned NOT NULL DEFAULT '0',
`add_cpa_alone_time` int(11) unsigned NOT NULL DEFAULT '0',
`is_h5_share_show` tinyint(3) unsigned NOT NULL DEFAULT '0',
`top_is_h5_share_show` tinyint(3) unsigned NOT NULL DEFAULT '0',
`update_time` int(10) NOT NULL DEFAULT '0',
`ksdy_set` text NOT NULL,
`game_is_open` tinyint(2) NOT NULL DEFAULT '1',
`user_limit_discount` decimal(10,2) NOT NULL DEFAULT '10.00',
`magic_power_show` tinyint(3) unsigned NOT NULL DEFAULT '0',
`magic_power_link` varchar(255) NOT NULL,
`promote_opus_ratio` double(5,2) NOT NULL DEFAULT '0.00',
`promote_invite_ratio` double(5,2) NOT NULL DEFAULT '0.00',
`pc_enable_status` tinyint(2) NOT NULL DEFAULT '0',
`output_pc_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`source_db` varchar(10) NOT NULL DEFAULT '',
PRIMARY KEY (`id`,`source_db`) USING BTREE,
KEY `promote_id` (`promote_id`) USING BTREE,
KEY `apply_search` (`promote_id`,`game_id`) USING BTREE,
KEY `game_id` (`game_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE `tab_spend` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL DEFAULT '0',
`user_account` varchar(200) NOT NULL DEFAULT '',
`game_id` int(11) NOT NULL DEFAULT '0',
`game_name` varchar(30) NOT NULL DEFAULT '',
`server_id` varchar(30) NOT NULL DEFAULT '0',
`server_name` varchar(30) NOT NULL DEFAULT '',
`game_player_id` varchar(30) NOT NULL DEFAULT '0',
`game_player_name` varchar(100) NOT NULL DEFAULT '',
`promote_id` int(11) NOT NULL DEFAULT '0',
`promote_account` varchar(30) NOT NULL DEFAULT '',
`order_number` varchar(100) NOT NULL DEFAULT '',
`pay_order_number` varchar(100) NOT NULL DEFAULT '',
`props_name` varchar(30) NOT NULL DEFAULT '',
`pay_amount` decimal(10,2) NOT NULL DEFAULT '0.00',
`advance_pay_amount` decimal(10,2) NOT NULL DEFAULT '0.00',
`discount` decimal(5,2) NOT NULL DEFAULT '10.00',
`discount_type` tinyint(2) NOT NULL DEFAULT '0',
`cost` decimal(10,2) NOT NULL DEFAULT '0.00',
`pay_time` int(11) NOT NULL DEFAULT '0',
`pay_status` tinyint(2) NOT NULL DEFAULT '0',
`pay_game_status` tinyint(2) NOT NULL DEFAULT '0',
`extra_param` varchar(255) NOT NULL DEFAULT '',
`extend` varchar(255) NOT NULL DEFAULT '',
`pay_way` tinyint(2) NOT NULL DEFAULT '0',
`spend_ip` varchar(20) NOT NULL DEFAULT '',
`is_check` tinyint(2) NOT NULL DEFAULT '0',
`sdk_version` tinyint(2) NOT NULL DEFAULT '1',
`receipt` varchar(1000) NOT NULL DEFAULT '',
`role_level` int(8) NOT NULL DEFAULT '0',
`small_id` int(11) NOT NULL DEFAULT '0',
`small_nickname` varchar(30) DEFAULT '',
`coupon_record_id` int(11) NOT NULL DEFAULT '0',
`is_weiduan` tinyint(1) NOT NULL DEFAULT '0',
`update_time` int(10) NOT NULL DEFAULT '0',
`pay_promote_id` int(10) NOT NULL DEFAULT '0',
`pay_config_id` int(10) NOT NULL DEFAULT '0',
`pay_config_sub` varchar(50) NOT NULL DEFAULT '',
`game_notify_info` varchar(1000) CHARACTER SET utf8mb4 NOT NULL DEFAULT '',
`product_id` varchar(100) CHARACTER SET utf8mb4 NOT NULL DEFAULT '',
`currency_code` varchar(10) CHARACTER SET utf8mb4 NOT NULL DEFAULT 'CNY',
`us_cost` decimal(10,2) NOT NULL DEFAULT '0.00',
`currency_cost` decimal(10,2) NOT NULL DEFAULT '0.00',
`area` tinyint(1) unsigned NOT NULL DEFAULT '0',
`goods_reserve` varchar(100) CHARACTER SET utf8mb4 NOT NULL DEFAULT '',
`auto_repair_times` tinyint(2) NOT NULL,
`platform_id` int(11) NOT NULL DEFAULT '0',
`webplatform_user_id` int(11) NOT NULL DEFAULT '0',
`platform_pay_type` tinyint(11) NOT NULL DEFAULT '0',
`cp_id` int(11) NOT NULL DEFAULT '0',
`cp_settlement_period_id` int(11) NOT NULL DEFAULT '0',
`super_order_number` varchar(100) NOT NULL DEFAULT '',
`is_bind_recycle` tinyint(1) NOT NULL DEFAULT '0',
`source_db` varchar(10) NOT NULL DEFAULT '',
PRIMARY KEY (`id`,`source_db`),
UNIQUE KEY `pay_order_number` (`pay_order_number`) USING BTREE,
KEY `promote_id` (`promote_id`) USING BTREE,
KEY `game_id` (`game_id`) USING BTREE,
KEY `spend_search` (`game_id`,`promote_id`,`user_id`,`pay_time`) USING BTREE,
KEY `user_id` (`user_id`) USING BTREE,
KEY `pay_status` (`pay_status`) USING BTREE,
KEY `pay_time` (`pay_time`) USING BTREE,
KEY `idx_spend_small_role_pay` (`small_id`,`server_id`,`game_player_id`,`pay_status`) USING BTREE,
KEY `idx_promote_pay_status` (`promote_id`,`pay_status`),
KEY `idx_promote_paytime_status` (`promote_id`,`pay_time`,`pay_status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE `tab_sw_report_day` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`stat_date` varchar(10) NOT NULL,
`source_db` varchar(10) NOT NULL DEFAULT '',
`promote_id` int(11) NOT NULL DEFAULT '0',
`game_id` int(11) NOT NULL DEFAULT '0',
`game_name` varchar(64) NOT NULL DEFAULT '',
`dedup_mode` tinyint(4) NOT NULL DEFAULT '0',
`new_register_cnt` int(11) NOT NULL DEFAULT '0',
`active_cnt` int(11) NOT NULL DEFAULT '0',
`pay_cnt` int(11) NOT NULL DEFAULT '0',
`new_pay_cnt` int(11) NOT NULL DEFAULT '0',
`total_pay` decimal(14,2) NOT NULL DEFAULT '0.00',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_sw_report_day` (`stat_date`,`source_db`,`promote_id`,`game_id`,`dedup_mode`),
KEY `idx_sw_report_day_query` (`stat_date`,`source_db`,`dedup_mode`,`promote_id`),
KEY `idx_sw_report_day_game_name` (`stat_date`,`dedup_mode`,`source_db`,`game_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `tab_sw_report_day_key` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`stat_date` varchar(10) NOT NULL,
`source_db` varchar(10) NOT NULL DEFAULT '',
`promote_id` int(11) NOT NULL DEFAULT '0',
`game_id` int(11) NOT NULL DEFAULT '0',
`game_name` varchar(64) NOT NULL DEFAULT '',
`dedup_mode` tinyint(4) NOT NULL DEFAULT '0',
`metric` tinyint(4) NOT NULL,
`identity_key` varchar(64) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_sw_report_day_key` (`stat_date`,`source_db`,`promote_id`,`game_id`,`dedup_mode`,`metric`,`identity_key`),
KEY `idx_key_channel` (`stat_date`,`dedup_mode`,`source_db`,`promote_id`,`metric`),
KEY `idx_key_game` (`stat_date`,`dedup_mode`,`source_db`,`game_id`,`metric`),
KEY `idx_key_game_name` (`stat_date`,`dedup_mode`,`source_db`,`game_name`,`metric`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `tab_sw_report_server_day` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`stat_date` varchar(10) NOT NULL,
`source_db` varchar(10) NOT NULL DEFAULT '',
`promote_id` int(11) NOT NULL DEFAULT '0',
`game_id` int(11) NOT NULL DEFAULT '0',
`game_name` varchar(64) NOT NULL DEFAULT '',
`server_num` varchar(32) NOT NULL DEFAULT '',
`dedup_mode` tinyint(4) NOT NULL DEFAULT '0',
`new_register_cnt` int(11) NOT NULL DEFAULT '0',
`active_cnt` int(11) NOT NULL DEFAULT '0',
`pay_cnt` int(11) NOT NULL DEFAULT '0',
`total_pay` decimal(14,2) NOT NULL DEFAULT '0.00',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_sw_report_server_day` (`stat_date`,`source_db`,`promote_id`,`game_id`,`server_num`,`dedup_mode`),
KEY `idx_server_day_query` (`stat_date`,`source_db`,`game_id`,`dedup_mode`,`server_num`),
KEY `idx_server_day_promote` (`stat_date`,`source_db`,`dedup_mode`,`promote_id`),
KEY `idx_server_day_game_name` (`stat_date`,`source_db`,`dedup_mode`,`game_name`,`server_num`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `tab_sw_report_server_day_key` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`stat_date` varchar(10) NOT NULL,
`source_db` varchar(10) NOT NULL DEFAULT '',
`promote_id` int(11) NOT NULL DEFAULT '0',
`game_id` int(11) NOT NULL DEFAULT '0',
`game_name` varchar(64) NOT NULL DEFAULT '',
`server_num` varchar(32) NOT NULL DEFAULT '',
`dedup_mode` tinyint(4) NOT NULL DEFAULT '0',
`metric` tinyint(4) NOT NULL,
`identity_key` varchar(64) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_sw_report_server_day_key` (`stat_date`,`source_db`,`promote_id`,`game_id`,`server_num`,`dedup_mode`,`metric`,`identity_key`),
KEY `idx_server_key_query` (`stat_date`,`dedup_mode`,`source_db`,`game_id`,`server_num`,`metric`),
KEY `idx_server_key_game_name` (`stat_date`,`dedup_mode`,`source_db`,`game_name`,`server_num`,`metric`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `tab_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`account` varchar(200) NOT NULL DEFAULT '',
`password` varchar(100) NOT NULL DEFAULT '',
`promote_id` int(11) NOT NULL DEFAULT '0',
`promote_account` varchar(30) NOT NULL DEFAULT '',
`parent_id` int(11) NOT NULL DEFAULT '0',
`parent_name` varchar(30) NOT NULL DEFAULT '',
`fgame_id` int(11) NOT NULL DEFAULT '0',
`fgame_name` varchar(30) NOT NULL DEFAULT '',
`nickname` varchar(30) NOT NULL DEFAULT '',
`sex` tinyint(1) NOT NULL DEFAULT '0',
`email` varchar(50) NOT NULL DEFAULT '',
`qq` varchar(20) NOT NULL DEFAULT '',
`phone` varchar(15) NOT NULL DEFAULT '',
`receive_address` varchar(255) NOT NULL DEFAULT '',
`real_name` varchar(20) NOT NULL DEFAULT '',
`idcard` varchar(20) NOT NULL DEFAULT '',
`vip_level` tinyint(2) NOT NULL DEFAULT '0',
`cumulative` decimal(10,2) NOT NULL DEFAULT '0.00',
`balance` decimal(10,2) NOT NULL DEFAULT '0.00',
`hzb_balance` decimal(10,2) NOT NULL DEFAULT '0.00',
`prize_pool` decimal(10,2) NOT NULL DEFAULT '0.00',
`lottery_num` int(11) NOT NULL DEFAULT '0',
`anti_addiction` tinyint(2) NOT NULL DEFAULT '0',
`lock_status` tinyint(2) NOT NULL DEFAULT '1',
`age_status` tinyint(2) NOT NULL DEFAULT '0',
`register_way` tinyint(2) NOT NULL DEFAULT '0',
`register_type` tinyint(2) NOT NULL DEFAULT '1',
`register_time` varchar(11) NOT NULL DEFAULT '0',
`login_time` int(11) NOT NULL DEFAULT '0',
`register_ip` varchar(16) NOT NULL DEFAULT '',
`login_ip` varchar(16) NOT NULL DEFAULT '',
`is_check` tinyint(2) NOT NULL DEFAULT '1',
`settle_check` tinyint(2) NOT NULL DEFAULT '0',
`sub_status` tinyint(2) NOT NULL DEFAULT '0',
`token` varchar(255) NOT NULL DEFAULT '',
`pkey` varchar(150) NOT NULL DEFAULT '',
`unionid` varchar(200) NOT NULL DEFAULT '',
`head_img` varchar(500) NOT NULL DEFAULT '',
`point` int(11) NOT NULL DEFAULT '0',
`gold_coin` double(11,2) NOT NULL DEFAULT '0.00',
`alipay` varchar(20) NOT NULL DEFAULT '',
`alipay_real_name` varchar(50) NOT NULL DEFAULT '',
`old_promote_id` int(11) NOT NULL DEFAULT '0',
`third_authentication` tinyint(1) NOT NULL DEFAULT '0',
`equipment_num` varchar(100) CHARACTER SET utf8mb4 NOT NULL DEFAULT '',
`is_bind` tinyint(2) NOT NULL DEFAULT '0',
`puid` int(11) NOT NULL DEFAULT '0',
`invitation_id` int(11) NOT NULL DEFAULT '0',
`is_platform` tinyint(1) NOT NULL DEFAULT '0',
`is_prompt` tinyint(1) NOT NULL DEFAULT '0',
`is_sell_prompt` tinyint(1) NOT NULL DEFAULT '0',
`member_days` int(6) NOT NULL DEFAULT '0',
`end_time` int(11) NOT NULL DEFAULT '0',
`wx_nickname` varchar(60) NOT NULL DEFAULT '',
`tplay_cash` decimal(11,2) unsigned NOT NULL DEFAULT '0.00',
`openid` varchar(200) NOT NULL DEFAULT '',
`pay_password` varchar(100) NOT NULL DEFAULT '',
`device_name` varchar(100) NOT NULL DEFAULT '',
`is_unsubscribe` tinyint(2) NOT NULL DEFAULT '0',
`wechat_cdkey` varchar(255) CHARACTER SET utf8mb4 NOT NULL DEFAULT '',
`sso` tinyint(2) NOT NULL DEFAULT '0',
`is_simulator` tinyint(2) NOT NULL DEFAULT '0',
`is_batch_create` tinyint(2) NOT NULL DEFAULT '0',
`user_score` decimal(8,1) NOT NULL DEFAULT '0.0',
`user_stage_id` int(11) NOT NULL DEFAULT '0',
`user_stage_remark` varchar(255) NOT NULL DEFAULT '',
`login_equipment_num` varchar(200) CHARACTER SET utf8mb4 NOT NULL DEFAULT '',
`is_new_real_name` tinyint(2) NOT NULL DEFAULT '0',
`ban_wxpay` tinyint(1) NOT NULL DEFAULT '0',
`ban_alipay` tinyint(1) NOT NULL DEFAULT '0',
`source_db` varchar(10) NOT NULL DEFAULT '',
PRIMARY KEY (`id`,`source_db`),
KEY `register_time` (`register_time`) USING BTREE,
KEY `promote_id` (`promote_id`) USING BTREE,
KEY `fgame_id` (`fgame_id`) USING BTREE,
KEY `deposite_search` (`promote_id`,`fgame_id`,`lock_status`,`register_way`,`register_time`) USING BTREE,
KEY `puid` (`puid`) USING BTREE,
KEY `phone` (`phone`) USING BTREE,
KEY `login_time` (`login_time`) USING BTREE,
KEY `idx_promote_puid` (`promote_id`,`puid`),
KEY `idx_promote_register` (`promote_id`,`register_time`),
KEY `idx_user_promote_logintime` (`promote_id`,`login_time`) USING BTREE,
KEY `account` (`account`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE `tab_user_day_login` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`login_record_id` int(11) NOT NULL DEFAULT '0',
`user_id` int(11) NOT NULL DEFAULT '0',
`promote_id` int(11) NOT NULL DEFAULT '0',
`game_id` int(11) NOT NULL DEFAULT '0',
`is_new` tinyint(1) NOT NULL DEFAULT '0',
`equipment_num` varchar(255) NOT NULL DEFAULT '',
`sdk_version` tinyint(1) NOT NULL DEFAULT '0',
`login_time` int(11) NOT NULL DEFAULT '0',
`source_db` varchar(10) NOT NULL DEFAULT '',
PRIMARY KEY (`id`,`source_db`),
KEY `login_time` (`login_time`) USING BTREE,
KEY `game_id` (`game_id`) USING BTREE,
KEY `promote_id` (`promote_id`) USING BTREE,
KEY `seach` (`game_id`,`promote_id`,`user_id`) USING BTREE,
KEY `seach1` (`user_id`,`login_time`,`game_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `tab_user_play_info` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL DEFAULT '0',
`user_account` varchar(200) NOT NULL DEFAULT '',
`game_id` int(11) NOT NULL DEFAULT '0',
`game_name` varchar(30) NOT NULL DEFAULT '',
`server_id` varchar(30) NOT NULL DEFAULT '',
`server_name` varchar(30) NOT NULL DEFAULT '',
`role_id` varchar(30) NOT NULL DEFAULT '',
`role_name` varchar(30) NOT NULL DEFAULT '',
`role_level` int(8) NOT NULL DEFAULT '0',
`combat_number` varchar(30) NOT NULL DEFAULT '',
`promote_id` int(11) NOT NULL DEFAULT '0',
`promote_account` varchar(30) NOT NULL DEFAULT '',
`play_time` int(11) NOT NULL DEFAULT '0',
`down_time` int(11) NOT NULL DEFAULT '0',
`play_ip` varchar(30) NOT NULL DEFAULT '',
`update_time` int(11) NOT NULL DEFAULT '0',
`puid` int(11) NOT NULL DEFAULT '0',
`nickname` varchar(30) NOT NULL DEFAULT '',
`player_reserve` varchar(100) CHARACTER SET utf8mb4 NOT NULL DEFAULT '',
`create_time` int(11) NOT NULL DEFAULT '0',
`source_db` varchar(10) NOT NULL DEFAULT '',
PRIMARY KEY (`id`,`source_db`) USING BTREE,
KEY `user_id` (`user_id`) USING BTREE,
KEY `game_id` (`game_id`) USING BTREE,
KEY `promote_id` (`promote_id`) USING BTREE,
KEY `search` (`user_id`,`game_id`,`server_id`,`server_name`,`role_id`) USING BTREE,
KEY `puid` (`puid`) USING BTREE,
KEY `play_time` (`play_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE `test_demo` (
`id` bigint(20) NOT NULL,
`dept_id` bigint(20) DEFAULT NULL,
`user_id` bigint(20) DEFAULT NULL,
`order_num` int(11) DEFAULT '0',
`test_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`value` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`version` int(11) DEFAULT '0',
`create_dept` bigint(20) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`create_by` bigint(20) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`update_by` bigint(20) DEFAULT NULL,
`del_flag` int(11) DEFAULT '0',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `test_tree` (
`id` bigint(20) NOT NULL,
`parent_id` bigint(20) DEFAULT '0',
`dept_id` bigint(20) DEFAULT NULL,
`user_id` bigint(20) DEFAULT NULL,
`tree_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`version` int(11) DEFAULT '0',
`create_dept` bigint(20) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`create_by` bigint(20) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`update_by` bigint(20) DEFAULT NULL,
`del_flag` int(11) DEFAULT '0',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;