-- phpMyAdmin SQL Dump
-- version 5.2.3
-- https://www.phpmyadmin.net/
--
-- 主机： localhost
-- 生成日期： 2026-03-07 20:25:43
-- 服务器版本： 8.0.24
-- PHP 版本： 8.2.28

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- 数据库： `fire`
--

-- --------------------------------------------------------

--
-- 表的结构 `game_sugar_spin`
--

CREATE TABLE `game_sugar_spin` (
  `gid` bigint NOT NULL COMMENT 'spinfree_spinspin',
  `score` decimal(10,2) NOT NULL DEFAULT '0.00',
  `count` int NOT NULL DEFAULT '0' COMMENT 'step',
  `feature` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'normal' COMMENT 'normal:spin free: super_free:',
  `extra_free` int NOT NULL DEFAULT '0' COMMENT 'spinspin',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='spin';

-- --------------------------------------------------------

--
-- 表的结构 `game_sugar_spin_free`
--

CREATE TABLE `game_sugar_spin_free` (
  `gid` bigint NOT NULL COMMENT 'spinfree_spinspin',
  `score` decimal(10,2) NOT NULL DEFAULT '0.00',
  `count` int NOT NULL DEFAULT '0' COMMENT 'step',
  `feature` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'normal' COMMENT 'normal:spin free: super_free:',
  `extra_free` int NOT NULL DEFAULT '0' COMMENT 'spinspin',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='spin';

-- --------------------------------------------------------

--
-- 表的结构 `game_sugar_spin_super`
--

CREATE TABLE `game_sugar_spin_super` (
  `gid` bigint NOT NULL COMMENT 'spinfree_spinspin',
  `score` decimal(10,2) NOT NULL DEFAULT '0.00',
  `count` int NOT NULL DEFAULT '0' COMMENT 'step',
  `feature` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'normal' COMMENT 'normal:spin free: super_free:',
  `extra_free` int NOT NULL DEFAULT '0' COMMENT 'spinspin',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='spin';

-- --------------------------------------------------------

--
-- 表的结构 `game_sugar_step_info`
--

CREATE TABLE `game_sugar_step_info` (
  `id` bigint NOT NULL COMMENT 'id',
  `gid` bigint NOT NULL COMMENT 'spin id',
  `free_spin_id` int NOT NULL COMMENT 'free spin id',
  `aes` int NOT NULL COMMENT 'stepspinstep',
  `multipler` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '',
  `grid` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '',
  `symbol_links` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT 'JSON',
  `score` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT 'step * ',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- 表的结构 `game_sugar_step_info_free`
--

CREATE TABLE `game_sugar_step_info_free` (
  `id` bigint NOT NULL COMMENT 'id',
  `gid` bigint NOT NULL COMMENT 'spin id',
  `free_spin_id` int NOT NULL COMMENT 'free spin id',
  `aes` int NOT NULL COMMENT 'stepspinstep',
  `multipler` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '',
  `grid` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '',
  `symbol_links` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT 'JSON',
  `score` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT 'step * ',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- 表的结构 `game_sugar_step_info_super`
--

CREATE TABLE `game_sugar_step_info_super` (
  `id` bigint NOT NULL COMMENT 'id',
  `gid` bigint NOT NULL COMMENT 'spin id',
  `free_spin_id` int NOT NULL COMMENT 'free spin id',
  `aes` int NOT NULL COMMENT 'stepspinstep',
  `multipler` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '',
  `grid` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '',
  `symbol_links` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT 'JSON',
  `score` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT 'step * ',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- 表的结构 `game_sugar_user`
--

CREATE TABLE `game_sugar_user` (
  `id` bigint NOT NULL COMMENT 'id',
  `user_id` bigint NOT NULL COMMENT 'user表的id',
  `total_bet` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '用户总下注额',
  `total_win` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '用户总赢得金额',
  `count` int NOT NULL DEFAULT '0' COMMENT '总spin次数',
  `free_count` int NOT NULL DEFAULT '0' COMMENT '总购买free spin次数',
  `super_free_count` int NOT NULL DEFAULT '0' COMMENT '总购买super_free spin次数',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='糖果游戏用户表';

-- --------------------------------------------------------

--
-- 表的结构 `game_sugar_win`
--

CREATE TABLE `game_sugar_win` (
  `id` bigint NOT NULL COMMENT 'id',
  `date` datetime NOT NULL COMMENT '日期',
  `init_bet` decimal(10,2) NOT NULL COMMENT '系统初始下注额',
  `total_bet` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '用户总下注额',
  `total_win` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '用户总赢得金额',
  `count` int NOT NULL DEFAULT '0' COMMENT '总spin次数',
  `free_count` int NOT NULL DEFAULT '0' COMMENT '总购买free spin次数',
  `super_free_count` int NOT NULL DEFAULT '0' COMMENT '总购买super_free spin次数',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='糖果游戏每日统计表';

-- --------------------------------------------------------

--
-- 表的结构 `game_wheel_round`
--

CREATE TABLE `game_wheel_round` (
  `id` bigint NOT NULL COMMENT '唯一自增id',
  `date` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '所属日期',
  `round_id` bigint NOT NULL COMMENT 'round id',
  `start_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '开始时间',
  `end_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '结束时间',
  `phase_times` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '每个阶段的时间点',
  `total_bet` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '本期总下注数',
  `total_win` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '本期玩家总赢数',
  `symbols` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '转盘上的符号',
  `result` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '开出的奖的集合',
  `is_manual` int NOT NULL DEFAULT '0' COMMENT '是否后台开奖',
  `status` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '状态',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='转盘每期表';

-- --------------------------------------------------------

--
-- 表的结构 `game_wheel_round_bet`
--

CREATE TABLE `game_wheel_round_bet` (
  `id` bigint NOT NULL COMMENT '唯一自增id',
  `round_id` bigint NOT NULL COMMENT 'round id',
  `user_id` bigint NOT NULL DEFAULT '0' COMMENT '用户id',
  `bet` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '下注数',
  `bet_symbol` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '压注目标',
  `win` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '赔付结果',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='转盘下注表';

-- --------------------------------------------------------

--
-- 表的结构 `game_wheel_user`
--

CREATE TABLE `game_wheel_user` (
  `id` bigint NOT NULL COMMENT 'id',
  `user_id` bigint NOT NULL COMMENT 'user表的id',
  `total_bet` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '用户总下注额',
  `total_win` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '用户总赢得金额',
  `count` int NOT NULL DEFAULT '0' COMMENT '总下注次数',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='转盘用户表';

-- --------------------------------------------------------

--
-- 表的结构 `gen_table`
--

CREATE TABLE `gen_table` (
  `table_id` bigint NOT NULL,
  `table_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `table_comment` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `sub_table_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `sub_table_fk_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `class_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `tpl_category` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'crud',
  `package_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `module_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `business_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `function_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `function_author` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `gen_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
  `gen_path` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '/',
  `options` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `create_time` datetime DEFAULT NULL,
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `update_time` datetime DEFAULT NULL,
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `gen_table_column`
--

CREATE TABLE `gen_table_column` (
  `column_id` bigint NOT NULL,
  `table_id` bigint DEFAULT NULL,
  `column_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `column_comment` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `column_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `java_type` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `java_field` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `is_pk` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `is_increment` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `is_required` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `is_insert` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `is_edit` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `is_list` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `is_query` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `query_type` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'EQ',
  `html_type` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `dict_type` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `sort` int DEFAULT NULL,
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `create_time` datetime DEFAULT NULL,
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `update_time` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `qrtz_blob_triggers`
--

CREATE TABLE `qrtz_blob_triggers` (
  `sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '调度名称',
  `trigger_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'qrtz_triggers表trigger_name的外键',
  `trigger_group` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'qrtz_triggers表trigger_group的外键',
  `blob_data` blob COMMENT '存放持久化Trigger对象'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='Blob类型的触发器表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `qrtz_calendars`
--

CREATE TABLE `qrtz_calendars` (
  `sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '调度名称',
  `calendar_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '日历名称',
  `calendar` blob NOT NULL COMMENT '存放持久化calendar对象'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='日历信息表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `qrtz_cron_triggers`
--

CREATE TABLE `qrtz_cron_triggers` (
  `sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '调度名称',
  `trigger_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'qrtz_triggers表trigger_name的外键',
  `trigger_group` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'qrtz_triggers表trigger_group的外键',
  `cron_expression` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'cron表达式',
  `time_zone_id` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '时区'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='Cron类型的触发器表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `qrtz_fired_triggers`
--

CREATE TABLE `qrtz_fired_triggers` (
  `sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '调度名称',
  `entry_id` varchar(95) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '调度器实例id',
  `trigger_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'qrtz_triggers表trigger_name的外键',
  `trigger_group` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'qrtz_triggers表trigger_group的外键',
  `instance_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '调度器实例名',
  `fired_time` bigint NOT NULL COMMENT '触发的时间',
  `sched_time` bigint NOT NULL COMMENT '定时器制定的时间',
  `priority` int NOT NULL COMMENT '优先级',
  `state` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '状态',
  `job_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '任务名称',
  `job_group` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '任务组名',
  `is_nonconcurrent` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '是否并发',
  `requests_recovery` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '是否接受恢复执行'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='已触发的触发器表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `qrtz_job_details`
--

CREATE TABLE `qrtz_job_details` (
  `sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '调度名称',
  `job_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务名称',
  `job_group` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务组名',
  `description` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '相关介绍',
  `job_class_name` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '执行任务类名称',
  `is_durable` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否持久化',
  `is_nonconcurrent` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否并发',
  `is_update_data` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否更新数据',
  `requests_recovery` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否接受恢复执行',
  `job_data` blob COMMENT '存放持久化job对象'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='任务详细信息表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `qrtz_locks`
--

CREATE TABLE `qrtz_locks` (
  `sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '调度名称',
  `lock_name` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '悲观锁名称'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='存储的悲观锁信息表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `qrtz_paused_trigger_grps`
--

CREATE TABLE `qrtz_paused_trigger_grps` (
  `sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '调度名称',
  `trigger_group` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'qrtz_triggers表trigger_group的外键'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='暂停的触发器表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `qrtz_scheduler_state`
--

CREATE TABLE `qrtz_scheduler_state` (
  `sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '调度名称',
  `instance_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '实例名称',
  `last_checkin_time` bigint NOT NULL COMMENT '上次检查时间',
  `checkin_interval` bigint NOT NULL COMMENT '检查间隔时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='调度器状态表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `qrtz_simple_triggers`
--

CREATE TABLE `qrtz_simple_triggers` (
  `sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '调度名称',
  `trigger_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'qrtz_triggers表trigger_name的外键',
  `trigger_group` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'qrtz_triggers表trigger_group的外键',
  `repeat_count` bigint NOT NULL COMMENT '重复的次数统计',
  `repeat_interval` bigint NOT NULL COMMENT '重复的间隔时间',
  `times_triggered` bigint NOT NULL COMMENT '已经触发的次数'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='简单触发器的信息表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `qrtz_simprop_triggers`
--

CREATE TABLE `qrtz_simprop_triggers` (
  `sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '调度名称',
  `trigger_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'qrtz_triggers表trigger_name的外键',
  `trigger_group` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'qrtz_triggers表trigger_group的外键',
  `str_prop_1` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'String类型的trigger的第一个参数',
  `str_prop_2` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'String类型的trigger的第二个参数',
  `str_prop_3` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'String类型的trigger的第三个参数',
  `int_prop_1` int DEFAULT NULL COMMENT 'int类型的trigger的第一个参数',
  `int_prop_2` int DEFAULT NULL COMMENT 'int类型的trigger的第二个参数',
  `long_prop_1` bigint DEFAULT NULL COMMENT 'long类型的trigger的第一个参数',
  `long_prop_2` bigint DEFAULT NULL COMMENT 'long类型的trigger的第二个参数',
  `dec_prop_1` decimal(13,4) DEFAULT NULL COMMENT 'decimal类型的trigger的第一个参数',
  `dec_prop_2` decimal(13,4) DEFAULT NULL COMMENT 'decimal类型的trigger的第二个参数',
  `bool_prop_1` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'Boolean类型的trigger的第一个参数',
  `bool_prop_2` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'Boolean类型的trigger的第二个参数'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='同步机制的行锁表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `qrtz_triggers`
--

CREATE TABLE `qrtz_triggers` (
  `sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '调度名称',
  `trigger_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '触发器的名字',
  `trigger_group` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '触发器所属组的名字',
  `job_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'qrtz_job_details表job_name的外键',
  `job_group` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'qrtz_job_details表job_group的外键',
  `description` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '相关介绍',
  `next_fire_time` bigint DEFAULT NULL COMMENT '上一次触发时间（毫秒）',
  `prev_fire_time` bigint DEFAULT NULL COMMENT '下一次触发时间（默认为-1表示不触发）',
  `priority` int DEFAULT NULL COMMENT '优先级',
  `trigger_state` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '触发器状态',
  `trigger_type` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '触发器的类型',
  `start_time` bigint NOT NULL COMMENT '开始时间',
  `end_time` bigint DEFAULT NULL COMMENT '结束时间',
  `calendar_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '日程表名称',
  `misfire_instr` smallint DEFAULT NULL COMMENT '补偿执行的策略',
  `job_data` blob COMMENT '存放持久化job对象'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='触发器详细信息表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `sys_config`
--

CREATE TABLE `sys_config` (
  `config_id` int NOT NULL COMMENT '参数主键',
  `config_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '参数名称',
  `config_key` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '参数键名',
  `config_value` varchar(1024) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `config_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'N' COMMENT '系统内置（Y是 N否）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='参数配置表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `sys_dept`
--

CREATE TABLE `sys_dept` (
  `dept_id` bigint NOT NULL COMMENT '部门id',
  `parent_id` bigint DEFAULT '0' COMMENT '父部门id',
  `ancestors` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '祖级列表',
  `dept_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '部门名称',
  `order_num` int DEFAULT '0' COMMENT '显示顺序',
  `leader` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '负责人',
  `phone` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '联系电话',
  `email` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '邮箱',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '部门状态（0正常 1停用）',
  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '删除标志（0代表存在 2代表删除）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='部门表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `sys_dict_data`
--

CREATE TABLE `sys_dict_data` (
  `dict_code` bigint NOT NULL COMMENT '字典编码',
  `dict_sort` int DEFAULT '0' COMMENT '字典排序',
  `dict_label` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '字典标签',
  `dict_value` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '字典键值',
  `dict_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '字典类型',
  `css_class` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '样式属性（其他样式扩展）',
  `list_class` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '表格回显样式',
  `is_default` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'N' COMMENT '是否默认（Y是 N否）',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '状态（0正常 1停用）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='字典数据表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `sys_dict_type`
--

CREATE TABLE `sys_dict_type` (
  `dict_id` bigint NOT NULL COMMENT '字典主键',
  `dict_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '字典名称',
  `dict_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '字典类型',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '状态（0正常 1停用）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='字典类型表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `sys_job`
--

CREATE TABLE `sys_job` (
  `job_id` bigint NOT NULL COMMENT '任务ID',
  `job_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '任务名称',
  `job_group` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'DEFAULT' COMMENT '任务组名',
  `invoke_target` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '调用目标字符串',
  `cron_expression` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'cron执行表达式',
  `misfire_policy` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '3' COMMENT '计划执行错误策略（1立即执行 2执行一次 3放弃执行）',
  `concurrent` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '1' COMMENT '是否并发执行（0允许 1禁止）',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '状态（0正常 1暂停）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '备注信息'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='定时任务调度表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `sys_job_log`
--

CREATE TABLE `sys_job_log` (
  `job_log_id` bigint NOT NULL COMMENT '任务日志ID',
  `job_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务名称',
  `job_group` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务组名',
  `invoke_target` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '调用目标字符串',
  `job_message` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '日志信息',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '执行状态（0正常 1失败）',
  `exception_info` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '异常信息',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='定时任务调度日志表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `sys_logininfor`
--

CREATE TABLE `sys_logininfor` (
  `info_id` bigint NOT NULL COMMENT '访问ID',
  `user_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '用户账号',
  `ipaddr` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '登录IP地址',
  `login_location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '登录地点',
  `browser` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '浏览器类型',
  `os` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '操作系统',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '登录状态（0成功 1失败）',
  `msg` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '提示消息',
  `login_time` datetime DEFAULT NULL COMMENT '访问时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='系统访问记录' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `sys_menu`
--

CREATE TABLE `sys_menu` (
  `menu_id` bigint NOT NULL COMMENT '菜单ID',
  `menu_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '菜单名称',
  `parent_id` bigint DEFAULT '0' COMMENT '父菜单ID',
  `order_num` int DEFAULT '0' COMMENT '显示顺序',
  `path` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '路由地址',
  `component` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '组件路径',
  `query` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '路由参数',
  `is_frame` int DEFAULT '1' COMMENT '外链',
  `is_cache` int DEFAULT '0' COMMENT '缓存',
  `menu_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '类型',
  `visible` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '标识',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '状态',
  `perms` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '权限标识',
  `icon` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '#' COMMENT '菜单图标',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '备注'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='菜单权限表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `sys_notice`
--

CREATE TABLE `sys_notice` (
  `notice_id` int NOT NULL COMMENT '公告ID',
  `notice_title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '公告标题',
  `notice_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '公告类型（1通知 2公告）',
  `notice_content` longblob COMMENT '公告内容',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '公告状态（0正常 1关闭）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='通知公告表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `sys_oper_log`
--

CREATE TABLE `sys_oper_log` (
  `oper_id` bigint NOT NULL COMMENT '日志主键',
  `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '模块标题',
  `business_type` int DEFAULT '0' COMMENT '业务类型（0其它 1新增 2修改 3删除）',
  `method` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '方法名称',
  `request_method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '请求方式',
  `operator_type` int DEFAULT '0' COMMENT '操作类别（0其它 1后台用户 2手机端用户）',
  `oper_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '操作人员',
  `dept_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '部门名称',
  `oper_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '请求URL',
  `oper_ip` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '主机地址',
  `oper_location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '操作地点',
  `oper_param` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '请求参数',
  `json_result` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '返回参数',
  `status` int DEFAULT '0' COMMENT '操作状态（0正常 1异常）',
  `error_msg` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '错误消息',
  `oper_time` datetime DEFAULT NULL COMMENT '操作时间',
  `cost_time` bigint DEFAULT '0' COMMENT '消耗时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='操作日志记录' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `sys_post`
--

CREATE TABLE `sys_post` (
  `post_id` bigint NOT NULL COMMENT '岗位ID',
  `post_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '岗位编码',
  `post_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '岗位名称',
  `post_sort` int NOT NULL COMMENT '显示顺序',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '状态（0正常 1停用）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='岗位信息表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `sys_role`
--

CREATE TABLE `sys_role` (
  `role_id` bigint NOT NULL COMMENT '角色ID',
  `role_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色名称',
  `role_key` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色权限字符串',
  `role_sort` int NOT NULL COMMENT '显示顺序',
  `data_scope` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '1' COMMENT '数据范围（1：全部数据权限 2：自定数据权限 3：本部门数据权限 4：本部门及以下数据权限）',
  `menu_check_strictly` tinyint(1) DEFAULT '1' COMMENT '菜单树选择项是否关联显示',
  `dept_check_strictly` tinyint(1) DEFAULT '1' COMMENT '部门树选择项是否关联显示',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色状态（0正常 1停用）',
  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '删除标志（0代表存在 2代表删除）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='角色信息表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `sys_role_dept`
--

CREATE TABLE `sys_role_dept` (
  `role_id` bigint NOT NULL COMMENT '角色ID',
  `dept_id` bigint NOT NULL COMMENT '部门ID'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='角色和部门关联表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `sys_role_menu`
--

CREATE TABLE `sys_role_menu` (
  `role_id` bigint NOT NULL COMMENT '角色ID',
  `menu_id` bigint NOT NULL COMMENT '菜单ID'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='角色和菜单关联表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `sys_user`
--

CREATE TABLE `sys_user` (
  `user_id` bigint NOT NULL COMMENT '用户ID',
  `dept_id` bigint DEFAULT NULL COMMENT '部门ID',
  `user_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户账号',
  `nick_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户昵称',
  `user_type` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '00' COMMENT '用户类型（00系统用户）',
  `email` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '用户邮箱',
  `phonenumber` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '手机号码',
  `sex` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '用户性别（0男 1女 2未知）',
  `avatar` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '头像地址',
  `password` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '密码',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '帐号状态（0正常 1停用）',
  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '删除标志（0代表存在 2代表删除）',
  `login_ip` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '最后登录IP',
  `login_date` datetime DEFAULT NULL COMMENT '最后登录时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='用户信息表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `sys_user_post`
--

CREATE TABLE `sys_user_post` (
  `user_id` bigint NOT NULL COMMENT '用户ID',
  `post_id` bigint NOT NULL COMMENT '岗位ID'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='用户与岗位关联表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `sys_user_role`
--

CREATE TABLE `sys_user_role` (
  `user_id` bigint NOT NULL COMMENT '用户ID',
  `role_id` bigint NOT NULL COMMENT '角色ID'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='用户和角色关联表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tianxin_order`
--

CREATE TABLE `tianxin_order` (
  `order_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '系统订单号(唯一)',
  `pay_type` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '支付方式:1支付宝',
  `goods_id` varchar(8) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '商户商品ID',
  `goods_price` decimal(10,2) DEFAULT NULL COMMENT '商户商品价格',
  `goods_num` int DEFAULT NULL COMMENT '商户商品数量',
  `total_amount` decimal(10,2) DEFAULT NULL COMMENT '付款总价',
  `user_ip` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '用户IP',
  `pay_status` int DEFAULT NULL COMMENT '支付状态: 0待支付，1已支付，2,取消支付',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '状态更新时间',
  `user_id` int DEFAULT NULL COMMENT '订单发起用户ID',
  `user_name` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '订单发起用户名',
  `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
  `call_back_order_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '回传单号',
  `call_back_msg` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '回传信息',
  `call_back_status` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '回传状态 成功，其他失败',
  `sign` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT 'sign',
  `subject` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '商品名'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_advertisement`
--

CREATE TABLE `tt_advertisement` (
  `id` int NOT NULL,
  `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `jump_link` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `sort` int DEFAULT '0',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_announcement`
--

CREATE TABLE `tt_announcement` (
  `announcement_id` int NOT NULL COMMENT '公告ID',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '标题',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '内容',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='公告表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------


--
-- 表的结构 `tt_announcement_read`
--

CREATE TABLE `tt_announcement_read` (
  `announcement_id` int NOT NULL COMMENT '公告ID',
  `user_id` int NOT NULL COMMENT '用户ID'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='已读公告表' ROW_FORMAT=DYNAMIC;


-- --------------------------------------------------------

--
-- 表的结构 `tt_attendance_record`
--

CREATE TABLE `tt_attendance_record` (
  `id` int NOT NULL,
  `user_id` int DEFAULT NULL COMMENT '用户id',
  `create_time` datetime DEFAULT NULL,
  `coin` int DEFAULT NULL COMMENT '获得金币数',
  `update_time` datetime DEFAULT NULL,
  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;


-- --------------------------------------------------------

--
-- 表的结构 `tt_banner`
--

CREATE TABLE `tt_banner` (
  `id` int NOT NULL,
  `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `jump_link` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `sort` int DEFAULT '0',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_bonus`
--

CREATE TABLE `tt_bonus` (
  `id` int NOT NULL,
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `description` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `cover_picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '2',
  `condition_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '3',
  `recharge_threshold` decimal(10,2) UNSIGNED DEFAULT NULL,
  `award_section` json DEFAULT NULL,
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '1',
  `sort_by` int DEFAULT '0',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `create_time` datetime DEFAULT NULL,
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `update_time` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------


-- --------------------------------------------------------

--
-- 表的结构 `tt_bonus_receive_record`
--

CREATE TABLE `tt_bonus_receive_record` (
  `id` int NOT NULL,
  `type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
  `bonus_id` int DEFAULT NULL,
  `vip_level_id` int DEFAULT NULL,
  `promotion_level_id` int DEFAULT NULL,
  `user_id` int DEFAULT NULL,
  `award_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
  `award_id` int DEFAULT '0',
  `award_price` decimal(10,2) UNSIGNED DEFAULT NULL,
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
  `receive_time` datetime DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

 --------------------------------------------------------

--
-- 表的结构 `tt_box`
--

CREATE TABLE `tt_box` (
  `box_id` int NOT NULL,
  `box_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `box_type_id` int DEFAULT '1',
  `price` decimal(10,2) DEFAULT NULL,
  `box_img01` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `box_img02` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `sort` int DEFAULT '0',
  `is_fight` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '1',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
  `open_num` bigint DEFAULT '0',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `create_time` datetime DEFAULT NULL,
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `update_time` datetime DEFAULT NULL,
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `is_home` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
  `box_kind` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
  `box_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '1' COMMENT '宝箱类型',
  `comp_amount` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '补偿值'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_box_open_chance`
--

CREATE TABLE `tt_box_open_chance` (
  `ornament_id` int NOT NULL COMMENT '道具ID',
  `box_id` int DEFAULT NULL COMMENT '宝箱ID',
  `chance_num` int DEFAULT NULL COMMENT '开启次数'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='开箱机会' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_box_ornaments`
--

CREATE TABLE `tt_box_ornaments` (
  `id` int NOT NULL,
  `box_id` int DEFAULT NULL,
  `ornament_id` int DEFAULT NULL,
  `level` int DEFAULT '1',
  `odds` int DEFAULT '1' COMMENT '显示数量',
  `real_odds` int DEFAULT '0' COMMENT '真实数量',
  `anchor_odds` int DEFAULT '0' COMMENT '主播数量',
  `robot_odds` int DEFAULT '0' COMMENT '机器人数量',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `create_time` datetime DEFAULT NULL,
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `update_time` datetime DEFAULT NULL,
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `market_hash_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '市场唯一hash名称',
  `ornaments_zbt_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '扎比特平台id',
  `ornaments_yy_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'yyyouping平台id',
  `comp_odds` int DEFAULT '0' COMMENT '补偿概率',
  `real_comp_odds` int DEFAULT '0' COMMENT '真实补偿概率',
  `third_explosive_odds` int DEFAULT '0' COMMENT '三级爆率'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_box_records`
--

CREATE TABLE `tt_box_records` (
  `id` bigint NOT NULL,
  `user_id` int DEFAULT NULL COMMENT '开箱者ID',
  `box_id` int DEFAULT NULL,
  `box_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `box_price` decimal(10,2) DEFAULT NULL,
  `ornament_id` int DEFAULT NULL,
  `ornaments_price` decimal(10,2) DEFAULT NULL,
  `ornaments_level_id` int DEFAULT '1',
  `status` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `source` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `fight_id` int DEFAULT NULL,
  `roll_id` int DEFAULT NULL,
  `holder_user_id` int DEFAULT NULL COMMENT '最终持有者ID',
  `is_show` int DEFAULT '1' COMMENT '是否显示0不显示、1显示 *弃用字段',
  `image_url` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `fight_round_number` int DEFAULT NULL COMMENT '对战模式的回合数',
  `ornament_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `market_hash_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '市场唯一hash名称',
  `ornaments_zbt_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '扎比特平台id',
  `ornaments_yy_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'yyyouping平台id',
  `ornament_level_img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '等级图片'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='所有开箱记录' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

-- --------------------------------------------------------

--
-- 表的结构 `tt_box_third_explosive_user`
--

CREATE TABLE `tt_box_third_explosive_user` (
  `id` int NOT NULL,
  `box_id` int DEFAULT NULL,
  `user_id` int DEFAULT NULL,
  `create_time` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_box_type`
--

CREATE TABLE `tt_box_type` (
  `id` int NOT NULL,
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `icon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `sort` int DEFAULT '0',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `is_fight_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_commission_record`
--

CREATE TABLE `tt_commission_record` (
  `id` int NOT NULL COMMENT 'ID',
  `user_id` int DEFAULT NULL COMMENT '推广人员ID',
  `commission` decimal(15,2) DEFAULT NULL COMMENT '佣金',
  `summary_time` datetime DEFAULT NULL COMMENT '汇总时间',
  `claim_status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '领取状态（0未领取 1已领取）',
  `claim_time` datetime DEFAULT NULL COMMENT '领取时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='佣金记录表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_commission_record_0812`
--

CREATE TABLE `tt_commission_record_0812` (
  `id` int NOT NULL COMMENT 'ID',
  `user_id` int DEFAULT NULL COMMENT '推广人员ID',
  `commission` decimal(15,2) DEFAULT NULL COMMENT '佣金',
  `summary_time` datetime DEFAULT NULL COMMENT '汇总时间',
  `claim_status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '领取状态（0未领取 1已领取）',
  `claim_time` datetime DEFAULT NULL COMMENT '领取时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='佣金记录表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_comp_record`
--

CREATE TABLE `tt_comp_record` (
  `user_id` int NOT NULL COMMENT '用户ID',
  `box_id` int NOT NULL COMMENT '宝箱ID',
  `comp_amount` int DEFAULT NULL COMMENT '补偿值'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='补偿值记录表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_content`
--

CREATE TABLE `tt_content` (
  `id` int NOT NULL,
  `type_id` int DEFAULT NULL,
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `link` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `page_view` int DEFAULT '0',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_content_type`
--

CREATE TABLE `tt_content_type` (
  `id` int NOT NULL,
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `alias` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_delivery_record`
--

CREATE TABLE `tt_delivery_record` (
  `id` int NOT NULL COMMENT 'ID',
  `user_id` int DEFAULT NULL COMMENT '用户ID',
  `box_records_id` int DEFAULT NULL COMMENT '用户背包记录ID',
  `ornament_id` int DEFAULT NULL COMMENT '饰品ID',
  `ornaments_price` decimal(10,2) DEFAULT NULL COMMENT '饰品价格',
  `out_trade_no` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '网站订单号',
  `delivery` int DEFAULT NULL COMMENT '网站发货模式（1人工发货 2自动发货 3主播号提取）',
  `buy_price` decimal(10,2) DEFAULT NULL COMMENT '实际购买价格',
  `thirdparty_delivery` int DEFAULT NULL COMMENT '第三方发货模式',
  `order_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '第三方平台订单号',
  `status` int DEFAULT '1' COMMENT '发货订单状态（1待发货 3待收货 10订单完成 11订单取消）',
  `message` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `create_time` datetime DEFAULT NULL,
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `update_time` datetime DEFAULT NULL,
  `market_hash_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '市场唯一hash名称'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='申请提货记录' ROW_FORMAT=DYNAMIC;



--
-- 表的结构 `tt_exponent`
--

CREATE TABLE `tt_exponent` (
  `id` int NOT NULL,
  `exponent` int DEFAULT NULL COMMENT '指数结果',
  `points` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `forward` int DEFAULT NULL,
  `number` int DEFAULT NULL COMMENT '当天第几期',
  `create_time` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_exponent_user`
--

CREATE TABLE `tt_exponent_user` (
  `id` int NOT NULL,
  `exponent_id` int DEFAULT NULL,
  `box_id` int DEFAULT NULL,
  `user_id` int DEFAULT NULL,
  `price` decimal(10,2) DEFAULT NULL,
  `forward` int DEFAULT NULL COMMENT '1上升 2下降',
  `status` int DEFAULT NULL COMMENT '1成功 2失败',
  `box_record_id` int DEFAULT NULL COMMENT '成功的话开出来的盒子记录ID',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_exponent_user_box`
--

CREATE TABLE `tt_exponent_user_box` (
  `id` int NOT NULL,
  `box_id` int DEFAULT NULL,
  `user_id` int DEFAULT NULL,
  `number` int DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_fight`
--

CREATE TABLE `tt_fight` (
  `id` int NOT NULL,
  `user_id` int DEFAULT NULL COMMENT '房主',
  `model` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '模式（0欧皇 1非酋）',
  `player_num` int DEFAULT NULL COMMENT '房间人数',
  `box_data` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `box_price_total` decimal(10,2) DEFAULT NULL COMMENT '宝箱总价',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '状态（0等待中 1进行中 2已结束）',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL,
  `seats` json DEFAULT NULL COMMENT '座位',
  `begin_time` datetime DEFAULT NULL COMMENT '开始时间',
  `round_number` int DEFAULT NULL COMMENT '回合数',
  `end_time` datetime DEFAULT NULL COMMENT '结束时间',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `winner_ids` json DEFAULT NULL COMMENT '赢家id',
  `box_sequence` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '箱子顺序',
  `fight_type` int DEFAULT '0' COMMENT '对战方式0不合资1合资',
  `fight_result` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '合资对战信息'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='对战表，相当于一个房间' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_fight_ranking_reward`
--

CREATE TABLE `tt_fight_ranking_reward` (
  `id` int NOT NULL COMMENT 'ID',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '排名名称',
  `reward` decimal(10,2) DEFAULT NULL COMMENT '奖励金额'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='对战奖励金额表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_fight_result`
--

CREATE TABLE `tt_fight_result` (
  `id` int NOT NULL,
  `fight_id` int DEFAULT NULL,
  `fight_result` json DEFAULT NULL,
  `create_time` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='废弃表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_fight_round`
--

CREATE TABLE `tt_fight_round` (
  `id` int NOT NULL,
  `current_round` int DEFAULT NULL,
  `total_round` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='对战回合 废弃表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_fight_user`
--

CREATE TABLE `tt_fight_user` (
  `id` int NOT NULL,
  `fight_id` int DEFAULT NULL,
  `user_id` int DEFAULT NULL,
  `join_price` decimal(10,2) DEFAULT NULL,
  `join_seat_num` int DEFAULT NULL,
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '玩家状态（0空位 1入座 2就绪）',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_first_recharge`
--

CREATE TABLE `tt_first_recharge` (
  `id` int NOT NULL COMMENT 'ID',
  `min_amount` decimal(10,2) DEFAULT NULL COMMENT '充值金额下限',
  `ratio` decimal(10,2) DEFAULT NULL COMMENT '赠送比例',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '规则描述',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='首充赠送表' ROW_FORMAT=DYNAMIC;



--
-- 表的结构 `tt_game_mould`
--

CREATE TABLE `tt_game_mould` (
  `id` int NOT NULL,
  `name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_game_mould_box`
--

CREATE TABLE `tt_game_mould_box` (
  `id` int NOT NULL,
  `box_id` int DEFAULT NULL,
  `mould_id` int DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_message`
--

CREATE TABLE `tt_message` (
  `id` int NOT NULL,
  `message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_message_send`
--

CREATE TABLE `tt_message_send` (
  `id` int NOT NULL,
  `rec_id` int DEFAULT NULL,
  `message_id` int DEFAULT NULL,
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
  `send_time` datetime DEFAULT NULL,
  `reading_time` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_notice`
--

CREATE TABLE `tt_notice` (
  `notice_id` int NOT NULL COMMENT '通知ID',
  `user_id` int NOT NULL COMMENT '用户ID',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '标题',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '内容',
  `read` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '阅读状态（0未读 1已读）',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='通知表' ROW_FORMAT=DYNAMIC;



--
-- 表的结构 `tt_order`
--

CREATE TABLE `tt_order` (
  `id` int NOT NULL,
  `user_id` int DEFAULT NULL,
  `third_party` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '平台',
  `type` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '0卡密 1支付宝  2微信 。。。',
  `goods_id` int DEFAULT NULL,
  `goods_price` decimal(10,2) DEFAULT NULL,
  `goods_num` int DEFAULT '1',
  `total_amount` decimal(10,2) DEFAULT NULL,
  `order_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `sign` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `status` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
  `out_trade_no` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `pay_url` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `bd_vid` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;


--
-- 表的结构 `tt_ornament`
--

CREATE TABLE `tt_ornament` (
  `id` bigint NOT NULL COMMENT 'hash转码得到 加索引',
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `use_price` decimal(10,2) DEFAULT NULL,
  `image_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `market_hash_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '市场唯一hash',
  `item_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '弃用 删除',
  `price` decimal(10,2) DEFAULT NULL,
  `quantity` int DEFAULT '0',
  `short_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `type` varchar(70) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `type_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `quality` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '1',
  `quality_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `quality_color` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `rarity` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `rarity_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `rarity_color` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `exterior` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `exterior_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `is_putaway` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '1' COMMENT '是否商城上架（0上架 1下架）',
  `is_proprietary_property` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '1' COMMENT '是否本网站自定义道具（0是 1否）',
  `zbt_id` bigint DEFAULT NULL COMMENT 'zbt平台id',
  `yyyouping_id` bigint DEFAULT NULL COMMENT 'yy平台id',
  `type_hash_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '类型Hash',
  `exterior_hash_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '外观hash',
  `quality_hash_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '品质哈希',
  `rarity_hash_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '稀有度哈希'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='zbt平台所有商品模板' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_ornaments_level`
--

CREATE TABLE `tt_ornaments_level` (
  `id` int NOT NULL,
  `level` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `level_img` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_ornament_yy`
--

CREATE TABLE `tt_ornament_yy` (
  `id` int NOT NULL,
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `hash_name` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `type_id` int DEFAULT NULL,
  `type_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `type_hash_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `weapon_id` int DEFAULT NULL,
  `weapon_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `weapon_hash_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `update_time` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_ornament_zbt`
--

CREATE TABLE `tt_ornament_zbt` (
  `id` bigint NOT NULL COMMENT 'hash转码得到',
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `use_price` decimal(15,2) DEFAULT NULL,
  `image_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `market_hash_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '市场唯一hash',
  `item_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '弃用 删除',
  `price` decimal(15,2) DEFAULT NULL,
  `quantity` int DEFAULT '0',
  `short_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `type` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `type_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `quality` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '1',
  `quality_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `quality_color` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `rarity` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `rarity_name` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `rarity_color` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `exterior` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `exterior_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `is_putaway` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '1' COMMENT '不知道有啥用',
  `is_proprietary_property` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '1' COMMENT '不知道有啥用',
  `zbt_id` bigint DEFAULT NULL COMMENT 'zbt平台id',
  `yyyouping_id` bigint DEFAULT NULL COMMENT 'yy平台id'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='zbt平台所有商品模板' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_promotion_level`
--

CREATE TABLE `tt_promotion_level` (
  `id` int NOT NULL,
  `name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `icon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `recharge_threshold` decimal(10,2) UNSIGNED DEFAULT NULL COMMENT '推广等级达标金额',
  `commissions` decimal(10,2) UNSIGNED DEFAULT NULL COMMENT '推广返佣比例',
  `added_bonus` decimal(10,2) UNSIGNED DEFAULT NULL COMMENT '等级达标奖励红包金额',
  `recharge_gift_ratio` decimal(10,2) DEFAULT NULL COMMENT '充值赠送比例',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_promotion_record`
--

CREATE TABLE `tt_promotion_record` (
  `id` int NOT NULL COMMENT 'ID',
  `user_id` int DEFAULT NULL COMMENT '用户ID',
  `subordinate_user_id` int DEFAULT NULL COMMENT '下级用户ID',
  `recharge_price` decimal(10,2) DEFAULT NULL,
  `rebate` decimal(10,2) DEFAULT NULL,
  `recharge_record_id` int DEFAULT NULL,
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_promotion_update`
--

CREATE TABLE `tt_promotion_update` (
  `id` int NOT NULL,
  `employee_id` int DEFAULT NULL,
  `boss_id` int DEFAULT NULL,
  `create_time` timestamp NULL DEFAULT NULL,
  `update_time` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_recharge_card`
--

CREATE TABLE `tt_recharge_card` (
  `id` int NOT NULL,
  `recharge_list_id` int DEFAULT NULL,
  `price` decimal(10,2) UNSIGNED DEFAULT NULL,
  `password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
  `use_user_id` int DEFAULT NULL,
  `use_time` datetime DEFAULT NULL,
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `create_time` datetime DEFAULT NULL,
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `update_time` datetime DEFAULT NULL,
  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;


-- --------------------------------------------------------

--
-- 表的结构 `tt_recharge_config`
--

CREATE TABLE `tt_recharge_config` (
  `id` int NOT NULL,
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
  `price` decimal(10,2) DEFAULT NULL,
  `product_a` decimal(10,2) DEFAULT NULL COMMENT '产品：金币',
  `name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='充值配置表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_recharge_prod`
--

CREATE TABLE `tt_recharge_prod` (
  `id` int NOT NULL,
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
  `price` decimal(10,2) DEFAULT NULL,
  `card_link` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `product_a` decimal(10,2) DEFAULT NULL COMMENT '产品：金币',
  `product_c` decimal(10,2) DEFAULT NULL COMMENT '产品：积分',
  `name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `transaction_link` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='充值商品列表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_recharge_ranking_reward`
--

CREATE TABLE `tt_recharge_ranking_reward` (
  `id` int NOT NULL COMMENT 'ID',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '排名名称',
  `reward` decimal(10,2) DEFAULT NULL COMMENT '奖励金额'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='对战奖励金额表' ROW_FORMAT=DYNAMIC;

--
-- 表的结构 `tt_recharge_record`
--

CREATE TABLE `tt_recharge_record` (
  `id` int UNSIGNED NOT NULL,
  `user_id` int UNSIGNED DEFAULT NULL,
  `parent_id` int UNSIGNED DEFAULT '0',
  `arrival_amount` decimal(10,2) UNSIGNED DEFAULT NULL,
  `amount_actually_paid` decimal(10,2) UNSIGNED DEFAULT NULL,
  `finally_price` decimal(10,2) UNSIGNED DEFAULT NULL,
  `order_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '',
  `out_trade_no` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
  `channel_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='充值记录 弃用表' ROW_FORMAT=DYNAMIC;



--
-- 表的结构 `tt_red_pack`
--

CREATE TABLE `tt_red_pack` (
  `id` int NOT NULL COMMENT '主键',
  `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '标题',
  `pack_type` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '红包类型 1.充值红包 2.普通红包',
  `recharge_limit` decimal(10,2) DEFAULT NULL COMMENT '充值金额',
  `pack_count` int DEFAULT NULL COMMENT '总数量 0，无限制',
  `valid_count` int DEFAULT NULL COMMENT '剩余数量',
  `value_min` decimal(10,2) DEFAULT NULL COMMENT '红包最小值',
  `value_max` decimal(10,2) DEFAULT NULL COMMENT '红包最大值',
  `begin_time` datetime DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '结束时间',
  `status` int DEFAULT NULL COMMENT '状态0 已结束 1 进行中',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_red_packet`
--

CREATE TABLE `tt_red_packet` (
  `id` int NOT NULL,
  `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `description` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `num` int DEFAULT '1',
  `amount` json DEFAULT NULL,
  `user_id` int DEFAULT NULL,
  `password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `opening_time` datetime DEFAULT NULL,
  `validity` datetime DEFAULT NULL,
  `status` int DEFAULT '0',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `create_time` datetime DEFAULT NULL,
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `update_time` datetime DEFAULT NULL,
  `use_status` int DEFAULT NULL,
  `del_flag` int DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------
----------------------------------------

--
-- 表的结构 `tt_red_packet_record`
--

CREATE TABLE `tt_red_packet_record` (
  `id` int NOT NULL,
  `red_packet_id` int DEFAULT NULL,
  `user_id` int DEFAULT NULL,
  `receive_password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `receive_amount` decimal(10,2) DEFAULT NULL,
  `receive_time` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

-- --------------------------------------------------------

--
-- 表的结构 `tt_replacement_record`
--

CREATE TABLE `tt_replacement_record` (
  `id` int NOT NULL COMMENT 'id',
  `uid` int DEFAULT NULL COMMENT '用户id',
  `uname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '用户名称',
  `oids` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '饰品ids',
  `award_oid` int DEFAULT NULL COMMENT '合成饰品的id',
  `award_oname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '合成饰品的名称',
  `award_oprice` decimal(10,2) DEFAULT NULL COMMENT '合成饰品的价格',
  `time` datetime(6) DEFAULT NULL COMMENT '合成日期',
  `create_time` datetime(6) DEFAULT NULL COMMENT '创建日期',
  `update_time` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6) COMMENT '更新时间',
  `award_oimg` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '饰品图片'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

-- --------------------------------------------------------

--
-- 表的结构 `tt_robot_fight_group`
--

CREATE TABLE `tt_robot_fight_group` (
  `group_id` int NOT NULL COMMENT '分组ID',
  `group_name` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '分组名称',
  `seat_num` int DEFAULT NULL COMMENT '座位数量',
  `model` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '对战模式（0欧皇 1非酋）'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='机器人对战分组表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------


-- --------------------------------------------------------

--
-- 表的结构 `tt_robot_fight_group_box`
--

CREATE TABLE `tt_robot_fight_group_box` (
  `group_id` int NOT NULL COMMENT '分组ID',
  `box_id` int NOT NULL COMMENT '宝箱ID',
  `box_num` int DEFAULT NULL COMMENT '宝箱数量'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='机器人对战分组宝箱表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

-- --------------------------------------------------------

--
-- 表的结构 `tt_roll`
--

CREATE TABLE `tt_roll` (
  `id` int NOT NULL COMMENT 'ROLL房ID',
  `jackpot_id` int DEFAULT NULL COMMENT '奖池ID',
  `user_id` int DEFAULT '0' COMMENT '主播ID',
  `roll_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT 'ROLL房类型（0官方 1主播）',
  `roll_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'ROLL房名称',
  `description` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '描述',
  `end_time` datetime DEFAULT NULL COMMENT '结束时间',
  `people_num` int DEFAULT '1' COMMENT '参加人数',
  `roll_password` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'ROLL房密码',
  `min_recharge` decimal(10,2) DEFAULT NULL COMMENT '最低充值金额',
  `recharge_start_time` datetime DEFAULT NULL COMMENT '充值开始时间',
  `sort_by` int DEFAULT '0' COMMENT '排序',
  `roll_status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT 'ROLL房状态（0未开奖 1已开奖）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '删除状态'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------


--
-- 表的结构 `tt_roll_jackpot`
--

CREATE TABLE `tt_roll_jackpot` (
  `jackpot_id` int NOT NULL COMMENT '奖池ID',
  `jackpot_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '奖池名称',
  `description` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '描述',
  `total_price` decimal(10,2) DEFAULT NULL COMMENT '奖池总价',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='ROLL房奖池表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

-- --------------------------------------------------------

--
-- 表的结构 `tt_roll_jackpot_ornaments`
--

CREATE TABLE `tt_roll_jackpot_ornaments` (
  `id` int NOT NULL COMMENT 'ID',
  `jackpot_id` int DEFAULT NULL COMMENT '奖池ID',
  `ornaments_id` int DEFAULT NULL COMMENT '饰品ID',
  `ornament_level_id` int DEFAULT '1' COMMENT '饰品等级ID',
  `ornaments_num` int DEFAULT '1' COMMENT '饰品数量',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `price` decimal(10,2) DEFAULT NULL COMMENT '价格',
  `img_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '图片路径',
  `ornament_name` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '饰品名称'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='ROLL房奖池奖品表' ROW_FORMAT=DYNAMIC;


-- --------------------------------------------------------

--
-- 表的结构 `tt_roll_user`
--

CREATE TABLE `tt_roll_user` (
  `id` int NOT NULL COMMENT 'ID',
  `roll_id` int DEFAULT NULL COMMENT 'ROLL房ID',
  `user_id` int DEFAULT NULL COMMENT '用户ID',
  `jackpot_ornaments_id` int DEFAULT '0' COMMENT '奖池饰品ID',
  `ornaments_id` int DEFAULT '0' COMMENT '饰品ID',
  `box_record_id` bigint DEFAULT '0' COMMENT '开箱记录ID',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '状态',
  `designated_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '指定人',
  `join_time` datetime DEFAULT NULL COMMENT '加入时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `get_prize_way` int DEFAULT NULL COMMENT '获奖方式（0指定）',
  `user_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '用户名',
  `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '头像',
  `nick_name` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '昵称'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='ROLL房用户关联表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_roll_user_prize`
--

CREATE TABLE `tt_roll_user_prize` (
  `id` int NOT NULL COMMENT 'ID',
  `roll_user_id` int DEFAULT NULL COMMENT '用户ID',
  `roll_jackpot_id` int DEFAULT NULL COMMENT '奖池ID',
  `roll_jackpot_ornament_id` int DEFAULT NULL COMMENT '奖池物品ID',
  `number` int DEFAULT NULL COMMENT '数量',
  `ornament_id` bigint DEFAULT NULL COMMENT '物品ID',
  `price` decimal(10,2) DEFAULT NULL COMMENT '价格',
  `ornament_name` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '物品名称',
  `img_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '物品图片',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;


--
-- 表的结构 `tt_task_center`
--

CREATE TABLE `tt_task_center` (
  `task_id` int NOT NULL COMMENT '任务ID',
  `task_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '任务名称',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '任务描述',
  `identify` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '任务标识',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '任务状态（0停用 1启用）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='任务中心表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_task_center_user`
--

CREATE TABLE `tt_task_center_user` (
  `task_id` int NOT NULL COMMENT '任务ID',
  `user_id` int NOT NULL COMMENT '用户ID',
  `credit` decimal(15,2) DEFAULT NULL COMMENT '奖励积分',
  `claimed` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '是否已领取（1已领取）'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;



-- --------------------------------------------------------

--
-- 表的结构 `tt_time_roll`
--

CREATE TABLE `tt_time_roll` (
  `id` int NOT NULL,
  `jackpot_id` int DEFAULT NULL,
  `name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `description` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `recharge_condition` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '1',
  `min_recharge` decimal(10,2) DEFAULT NULL,
  `sort_by` int DEFAULT '0',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '1',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `create_time` datetime DEFAULT NULL,
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `update_time` datetime DEFAULT NULL,
  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
  `job_id` int DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------


--
-- 表的结构 `tt_time_roll_user`
--

CREATE TABLE `tt_time_roll_user` (
  `id` int NOT NULL,
  `time_roll_id` int DEFAULT NULL,
  `user_id` int DEFAULT NULL,
  `jackpot_ornaments_id` int DEFAULT '0',
  `ornaments_id` int DEFAULT '0',
  `box_record_id` bigint DEFAULT '0',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
  `designated_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `join_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `end_status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_upgrade_fail_ornaments`
--

CREATE TABLE `tt_upgrade_fail_ornaments` (
  `id` int NOT NULL,
  `upgrade_id` int DEFAULT NULL COMMENT 'tt_upgrade_ornaments表id',
  `ornament_id` int DEFAULT NULL COMMENT '失败奖励饰品id',
  `ornament_level_id` int DEFAULT '1',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `ornament_price` decimal(10,2) DEFAULT NULL,
  `ornament_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `ornament_number` int DEFAULT NULL COMMENT '数量'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------


--
-- 表的结构 `tt_upgrade_ornaments`
--

CREATE TABLE `tt_upgrade_ornaments` (
  `id` int NOT NULL,
  `ornaments_id` int DEFAULT NULL,
  `ornaments_level_id` int DEFAULT '1',
  `luck_section` json DEFAULT NULL COMMENT '通用幸运区间',
  `amount_required` decimal(10,2) DEFAULT NULL COMMENT '区间长度',
  `amount_invested` decimal(10,2) DEFAULT NULL COMMENT '区间当前进度',
  `anchor_luck_section` json DEFAULT NULL COMMENT '主播幸运区间',
  `anchor_amount_required` decimal(10,2) DEFAULT NULL COMMENT '区间长度',
  `anchor_amount_invested` decimal(10,2) DEFAULT NULL COMMENT '区间当前进度',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '1',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `ornament_price` decimal(10,2) DEFAULT NULL COMMENT '饰品原价',
  `total_input` decimal(10,2) DEFAULT NULL COMMENT '当前总投入'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------


-- --------------------------------------------------------

--
-- 表的结构 `tt_upgrade_record`
--

CREATE TABLE `tt_upgrade_record` (
  `id` bigint NOT NULL,
  `user_id` int DEFAULT NULL,
  `amount_consumed` decimal(10,2) DEFAULT NULL COMMENT '本次消费',
  `target_upgrade_id` int DEFAULT NULL COMMENT '目标升级物品id',
  `target_ornament_id` int DEFAULT NULL COMMENT '目标饰品',
  `target_ornament_price` decimal(10,2) DEFAULT NULL COMMENT '目标饰品价格',
  `gain_upgrade_fail_id` int DEFAULT NULL COMMENT '*弃用字段',
  `gain_ornament_list` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '最终奖励饰品集合',
  `gain_ornaments_price` decimal(10,2) DEFAULT NULL COMMENT '奖品总价',
  `open_time` datetime DEFAULT NULL COMMENT '创建时间',
  `user_type` varchar(4) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '用户类型',
  `is_victory` bit(1) DEFAULT NULL COMMENT '成败 0失败 1成功',
  `probability` int DEFAULT NULL COMMENT '概率',
  `nick_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '用户昵称'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

-- --------------------------------------------------------

--
-- 表的结构 `tt_user`
--

CREATE TABLE `tt_user` (
  `user_id` int NOT NULL,
  `user_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `nick_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `user_type` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '01' COMMENT '01主播 02普通玩家 03机器人',
  `email` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `phone_number` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `avatar` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `password` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `account_amount` decimal(10,2) DEFAULT NULL COMMENT '金币',
  `account_credits` decimal(10,2) DEFAULT NULL COMMENT '积分',
  `invitation_code` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `parent_id` int DEFAULT NULL,
  `vip_level` int DEFAULT '0',
  `promotion_level` int DEFAULT '0',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
  `delivery_status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
  `steam_id` bigint DEFAULT NULL,
  `transaction_link` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'sream交易链接',
  `real_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `id_num` varchar(18) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `certify_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `is_real_check` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '实名认证状态（0未实名 1已实名）',
  `commission_rate` decimal(10,2) DEFAULT NULL COMMENT '佣金比例',
  `login_ip` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `login_date` datetime DEFAULT NULL,
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `create_time` datetime DEFAULT NULL,
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `update_time` datetime DEFAULT NULL,
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
  `delivery_address` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '收货地址',
  `label_id` int DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_user_amount_records`
--

CREATE TABLE `tt_user_amount_records` (
  `id` int NOT NULL,
  `user_id` int DEFAULT NULL,
  `type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '1充值 2消费',
  `source` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `amount` decimal(10,2) DEFAULT NULL,
  `final_amount` decimal(10,2) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `remark` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `pw_child_id` int DEFAULT NULL COMMENT '推广福利 下级id',
  `pw_child_name` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `pw_child_account` decimal(10,0) DEFAULT NULL,
  `task_id` int DEFAULT NULL COMMENT '任务id'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

-- --------------------------------------------------------

--
-- 表的结构 `tt_user_avatar`
--

CREATE TABLE `tt_user_avatar` (
  `id` int NOT NULL,
  `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `is_default` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
  `sort` int DEFAULT '0',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_user_blend_ercash`
--

CREATE TABLE `tt_user_blend_ercash` (
  `id` bigint NOT NULL,
  `user_id` int DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL COMMENT '金币',
  `final_amount` decimal(19,2) DEFAULT NULL COMMENT '账户最终金币',
  `credits` decimal(10,2) DEFAULT NULL COMMENT '积分',
  `final_credits` decimal(10,2) DEFAULT NULL COMMENT '账户最终积分',
  `total` decimal(10,2) DEFAULT NULL COMMENT '汇总',
  `source` int DEFAULT NULL COMMENT '产生途径',
  `type` int DEFAULT NULL COMMENT '0支出 1收入',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='综合消费日志' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------


--
-- 表的结构 `tt_user_box_open_chance`
--

CREATE TABLE `tt_user_box_open_chance` (
  `user_id` int NOT NULL COMMENT '用户ID',
  `box_id` int NOT NULL COMMENT '宝箱ID',
  `chance_num` int DEFAULT NULL COMMENT '开启次数'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

-- --------------------------------------------------------

--
-- 表的结构 `tt_user_credits_records`
--

CREATE TABLE `tt_user_credits_records` (
  `id` int NOT NULL,
  `user_id` int DEFAULT NULL,
  `type` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `source` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `credits` decimal(10,2) DEFAULT NULL,
  `final_credits` decimal(10,2) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `remark` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `pw_child_id` int DEFAULT NULL COMMENT '推广福利 下级id',
  `pw_child_name` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `pw_child_account` decimal(10,0) DEFAULT NULL,
  `task_id` int DEFAULT NULL COMMENT '任务id'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_user_credits_records_0812`
--

CREATE TABLE `tt_user_credits_records_0812` (
  `id` int NOT NULL,
  `user_id` int DEFAULT NULL,
  `type` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `source` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `credits` decimal(10,2) DEFAULT NULL,
  `final_credits` decimal(10,2) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `remark` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `pw_child_id` int DEFAULT NULL COMMENT '推广福利 下级id',
  `pw_child_name` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `pw_child_account` decimal(10,0) DEFAULT NULL,
  `task_id` int DEFAULT NULL COMMENT '任务id'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_user_label`
--

CREATE TABLE `tt_user_label` (
  `id` int NOT NULL,
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_vip_level`
--

CREATE TABLE `tt_vip_level` (
  `id` int NOT NULL,
  `name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `icon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `recharge_threshold` decimal(10,2) UNSIGNED DEFAULT NULL,
  `commissions` decimal(10,2) UNSIGNED DEFAULT NULL,
  `added_bonus` decimal(10,2) UNSIGNED DEFAULT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_welfare`
--

CREATE TABLE `tt_welfare` (
  `welfare_id` int NOT NULL COMMENT '福利ID',
  `welfare_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '福利名称',
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '类型',
  `vip_level` int DEFAULT NULL COMMENT 'VIP等级',
  `box_id` int DEFAULT NULL COMMENT '箱子ID',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='福利表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_welfare_0812`
--

CREATE TABLE `tt_welfare_0812` (
  `welfare_id` int NOT NULL COMMENT '福利ID',
  `welfare_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '福利名称',
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '类型',
  `vip_level` int DEFAULT NULL COMMENT 'VIP等级',
  `box_id` int DEFAULT NULL COMMENT '箱子ID',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='福利表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_welfare_monthly_recharges`
--

CREATE TABLE `tt_welfare_monthly_recharges` (
  `welfare_id` int NOT NULL COMMENT '福利ID',
  `welfare_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '福利名称',
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '福利类型',
  `vip_level` int DEFAULT NULL COMMENT 'VIP等级',
  `amount` decimal(10,2) DEFAULT NULL COMMENT '充值金额',
  `box_id` int DEFAULT NULL COMMENT '福利宝箱ID'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='每月充值福利表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_welfare_monthly_recharges_0812`
--

CREATE TABLE `tt_welfare_monthly_recharges_0812` (
  `welfare_id` int NOT NULL COMMENT '福利ID',
  `welfare_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '福利名称',
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '福利类型',
  `vip_level` int DEFAULT NULL COMMENT 'VIP等级',
  `amount` decimal(10,2) DEFAULT NULL COMMENT '充值金额',
  `box_id` int DEFAULT NULL COMMENT '福利宝箱ID'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='每月充值福利表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_welfare_record`
--

CREATE TABLE `tt_welfare_record` (
  `welfare_record_id` int NOT NULL COMMENT '福利领取记录ID',
  `welfare_id` int DEFAULT NULL COMMENT '福利ID',
  `user_id` int DEFAULT NULL COMMENT '用户ID',
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '福利类型',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='福利领取记录表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_welfare_record_0812`
--

CREATE TABLE `tt_welfare_record_0812` (
  `welfare_record_id` int NOT NULL COMMENT '福利领取记录ID',
  `welfare_id` int DEFAULT NULL COMMENT '福利ID',
  `user_id` int DEFAULT NULL COMMENT '用户ID',
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '福利类型',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='福利领取记录表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

--
-- 表的结构 `tt_welfare_vip_level`
--

CREATE TABLE `tt_welfare_vip_level` (
  `welfare_id` int NOT NULL COMMENT '福利ID',
  `welfare_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '福利名称',
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '类型',
  `vip_level` int DEFAULT NULL COMMENT 'VIP等级',
  `box_id` int DEFAULT NULL COMMENT '宝箱ID'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='福利表' ROW_FORMAT=DYNAMIC;

-- --------------------------------------------------------

CREATE TABLE `tt_box_transfer_record` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `src_uid` bigint NOT NULL COMMENT '转增人uid',
  `dst_uid` bigint NOT NULL COMMENT '授予人uid',
  `box_record_id` bigint NOT NULL COMMENT '宝箱记录ID',
  `ornament_id` bigint DEFAULT NULL COMMENT '宝箱中饰品ID',
  `market_hash_name` varchar(255) DEFAULT NULL COMMENT '饰品市场哈希名称',
  `ornaments_zbt_id` varchar(64) DEFAULT NULL COMMENT '饰品ZBT ID',
  `ornaments_yy_id` varchar(64) DEFAULT NULL COMMENT '饰品YY ID',
  `ornament_name` varchar(255) DEFAULT NULL COMMENT '饰品名称',
  `ornaments_price` decimal(10,2) DEFAULT NULL COMMENT '饰品价格',
  `image_url` varchar(500) DEFAULT NULL COMMENT '饰品图片URL',
  `ornaments_level_id` int DEFAULT NULL COMMENT '饰品等级ID',
  `ornament_level_img` varchar(500) DEFAULT NULL COMMENT '饰品等级图片',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录更新时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `idx_src_dst_boxid` (`src_uid`,`dst_uid`, `box_record_id`),
  KEY `idx_src_uid` (`src_uid`),
  KEY `idx_dst_uid` (`dst_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='宝箱转增记录表';

--
-- 表的结构 `tt_welfare_vip_level_0812`
--

CREATE TABLE `tt_welfare_vip_level_0812` (
  `welfare_id` int NOT NULL COMMENT '福利ID',
  `welfare_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '福利名称',
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '类型',
  `vip_level` int DEFAULT NULL COMMENT 'VIP等级',
  `box_id` int DEFAULT NULL COMMENT '宝箱ID'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='福利表' ROW_FORMAT=DYNAMIC;

--
-- 转储表的索引
--

--
-- 表的索引 `game_sugar_spin`
--
ALTER TABLE `game_sugar_spin`
  ADD PRIMARY KEY (`gid`),
  ADD KEY `idx_feature` (`feature`),
  ADD KEY `idx_score` (`score`);

--
-- 表的索引 `game_sugar_spin_free`
--
ALTER TABLE `game_sugar_spin_free`
  ADD PRIMARY KEY (`gid`),
  ADD KEY `idx_feature` (`feature`),
  ADD KEY `idx_score` (`score`);

--
-- 表的索引 `game_sugar_spin_super`
--
ALTER TABLE `game_sugar_spin_super`
  ADD PRIMARY KEY (`gid`),
  ADD KEY `idx_feature` (`feature`),
  ADD KEY `idx_score` (`score`);

--
-- 表的索引 `game_sugar_step_info`
--
ALTER TABLE `game_sugar_step_info`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_gid_aes` (`gid`,`aes`) COMMENT 'gid+aes: step',
  ADD KEY `idx_gid` (`gid`);

--
-- 表的索引 `game_sugar_step_info_free`
--
ALTER TABLE `game_sugar_step_info_free`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_gid_aes` (`gid`,`aes`) COMMENT 'gid+aes: step',
  ADD KEY `idx_gid` (`gid`);

--
-- 表的索引 `game_sugar_step_info_super`
--
ALTER TABLE `game_sugar_step_info_super`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_gid_aes` (`gid`,`aes`) COMMENT 'gid+aes: step',
  ADD KEY `idx_gid` (`gid`);

--
-- 表的索引 `game_sugar_user`
--
ALTER TABLE `game_sugar_user`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `idx_user_id` (`user_id`);

--
-- 表的索引 `game_sugar_win`
--
ALTER TABLE `game_sugar_win`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `idx_date` (`date`);

--
-- 表的索引 `game_wheel_round`
--
ALTER TABLE `game_wheel_round`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_date_round_id` (`date`,`round_id`);

--
-- 表的索引 `game_wheel_round_bet`
--
ALTER TABLE `game_wheel_round_bet`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_round_user_symbol` (`round_id`,`user_id`,`bet_symbol`),
  ADD KEY `idx_user_id` (`user_id`);

--
-- 表的索引 `game_wheel_user`
--
ALTER TABLE `game_wheel_user`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `idx_user_id` (`user_id`);

--
-- 表的索引 `gen_table`
--
ALTER TABLE `gen_table`
  ADD PRIMARY KEY (`table_id`) USING BTREE;

--
-- 表的索引 `gen_table_column`
--
ALTER TABLE `gen_table_column`
  ADD PRIMARY KEY (`column_id`) USING BTREE;

--
-- 表的索引 `qrtz_blob_triggers`
--
ALTER TABLE `qrtz_blob_triggers`
  ADD PRIMARY KEY (`sched_name`,`trigger_name`,`trigger_group`) USING BTREE;

--
-- 表的索引 `qrtz_calendars`
--
ALTER TABLE `qrtz_calendars`
  ADD PRIMARY KEY (`sched_name`,`calendar_name`) USING BTREE;

--
-- 表的索引 `qrtz_cron_triggers`
--
ALTER TABLE `qrtz_cron_triggers`
  ADD PRIMARY KEY (`sched_name`,`trigger_name`,`trigger_group`) USING BTREE;

--
-- 表的索引 `qrtz_fired_triggers`
--
ALTER TABLE `qrtz_fired_triggers`
  ADD PRIMARY KEY (`sched_name`,`entry_id`) USING BTREE;

--
-- 表的索引 `qrtz_job_details`
--
ALTER TABLE `qrtz_job_details`
  ADD PRIMARY KEY (`sched_name`,`job_name`,`job_group`) USING BTREE;

--
-- 表的索引 `qrtz_locks`
--
ALTER TABLE `qrtz_locks`
  ADD PRIMARY KEY (`sched_name`,`lock_name`) USING BTREE;

--
-- 表的索引 `qrtz_paused_trigger_grps`
--
ALTER TABLE `qrtz_paused_trigger_grps`
  ADD PRIMARY KEY (`sched_name`,`trigger_group`) USING BTREE;

--
-- 表的索引 `qrtz_scheduler_state`
--
ALTER TABLE `qrtz_scheduler_state`
  ADD PRIMARY KEY (`sched_name`,`instance_name`) USING BTREE;

--
-- 表的索引 `qrtz_simple_triggers`
--
ALTER TABLE `qrtz_simple_triggers`
  ADD PRIMARY KEY (`sched_name`,`trigger_name`,`trigger_group`) USING BTREE;

--
-- 表的索引 `qrtz_simprop_triggers`
--
ALTER TABLE `qrtz_simprop_triggers`
  ADD PRIMARY KEY (`sched_name`,`trigger_name`,`trigger_group`) USING BTREE;

--
-- 表的索引 `qrtz_triggers`
--
ALTER TABLE `qrtz_triggers`
  ADD PRIMARY KEY (`sched_name`,`trigger_name`,`trigger_group`) USING BTREE,
  ADD KEY `sched_name` (`sched_name`,`job_name`,`job_group`) USING BTREE;

--
-- 表的索引 `sys_config`
--
ALTER TABLE `sys_config`
  ADD PRIMARY KEY (`config_id`) USING BTREE;

--
-- 表的索引 `sys_dept`
--
ALTER TABLE `sys_dept`
  ADD PRIMARY KEY (`dept_id`) USING BTREE;

--
-- 表的索引 `sys_dict_data`
--
ALTER TABLE `sys_dict_data`
  ADD PRIMARY KEY (`dict_code`) USING BTREE;

--
-- 表的索引 `sys_dict_type`
--
ALTER TABLE `sys_dict_type`
  ADD PRIMARY KEY (`dict_id`) USING BTREE,
  ADD UNIQUE KEY `dict_type` (`dict_type`) USING BTREE;

--
-- 表的索引 `sys_job`
--
ALTER TABLE `sys_job`
  ADD PRIMARY KEY (`job_id`,`job_name`,`job_group`) USING BTREE;

--
-- 表的索引 `sys_job_log`
--
ALTER TABLE `sys_job_log`
  ADD PRIMARY KEY (`job_log_id`) USING BTREE;

--
-- 表的索引 `sys_logininfor`
--
ALTER TABLE `sys_logininfor`
  ADD PRIMARY KEY (`info_id`) USING BTREE,
  ADD KEY `idx_sys_logininfor_s` (`status`) USING BTREE,
  ADD KEY `idx_sys_logininfor_lt` (`login_time`) USING BTREE;

--
-- 表的索引 `sys_menu`
--
ALTER TABLE `sys_menu`
  ADD PRIMARY KEY (`menu_id`) USING BTREE;

--
-- 表的索引 `sys_notice`
--
ALTER TABLE `sys_notice`
  ADD PRIMARY KEY (`notice_id`) USING BTREE;

--
-- 表的索引 `sys_oper_log`
--
ALTER TABLE `sys_oper_log`
  ADD PRIMARY KEY (`oper_id`) USING BTREE,
  ADD KEY `idx_sys_oper_log_bt` (`business_type`) USING BTREE,
  ADD KEY `idx_sys_oper_log_s` (`status`) USING BTREE,
  ADD KEY `idx_sys_oper_log_ot` (`oper_time`) USING BTREE;

--
-- 表的索引 `sys_post`
--
ALTER TABLE `sys_post`
  ADD PRIMARY KEY (`post_id`) USING BTREE;

--
-- 表的索引 `sys_role`
--
ALTER TABLE `sys_role`
  ADD PRIMARY KEY (`role_id`) USING BTREE;

--
-- 表的索引 `sys_role_dept`
--
ALTER TABLE `sys_role_dept`
  ADD PRIMARY KEY (`role_id`,`dept_id`) USING BTREE;

--
-- 表的索引 `sys_role_menu`
--
ALTER TABLE `sys_role_menu`
  ADD PRIMARY KEY (`role_id`,`menu_id`) USING BTREE;

--
-- 表的索引 `sys_user`
--
ALTER TABLE `sys_user`
  ADD PRIMARY KEY (`user_id`) USING BTREE;

--
-- 表的索引 `sys_user_post`
--
ALTER TABLE `sys_user_post`
  ADD PRIMARY KEY (`user_id`,`post_id`) USING BTREE;

--
-- 表的索引 `sys_user_role`
--
ALTER TABLE `sys_user_role`
  ADD PRIMARY KEY (`user_id`,`role_id`) USING BTREE;

--
-- 表的索引 `tianxin_order`
--
ALTER TABLE `tianxin_order`
  ADD PRIMARY KEY (`order_id`) USING BTREE;

--
-- 表的索引 `tt_advertisement`
--
ALTER TABLE `tt_advertisement`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_announcement`
--
ALTER TABLE `tt_announcement`
  ADD PRIMARY KEY (`announcement_id`) USING BTREE;

--
-- 表的索引 `tt_announcement_0812`
--
ALTER TABLE `tt_announcement_0812`
  ADD PRIMARY KEY (`announcement_id`) USING BTREE;

--
-- 表的索引 `tt_announcement_read`
--
ALTER TABLE `tt_announcement_read`
  ADD PRIMARY KEY (`announcement_id`,`user_id`) USING BTREE;

--
-- 表的索引 `tt_announcement_read_0812`
--
ALTER TABLE `tt_announcement_read_0812`
  ADD PRIMARY KEY (`announcement_id`,`user_id`) USING BTREE;

--
-- 表的索引 `tt_attendance_record`
--
ALTER TABLE `tt_attendance_record`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_attendance_record_0812`
--
ALTER TABLE `tt_attendance_record_0812`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_banner`
--
ALTER TABLE `tt_banner`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_bonus`
--
ALTER TABLE `tt_bonus`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_bonus_0812`
--
ALTER TABLE `tt_bonus_0812`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_bonus_receive_record`
--
ALTER TABLE `tt_bonus_receive_record`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_bonus_receive_record_0812`
--
ALTER TABLE `tt_bonus_receive_record_0812`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_box`
--
ALTER TABLE `tt_box`
  ADD PRIMARY KEY (`box_id`) USING BTREE;

--
-- 表的索引 `tt_box_open_chance`
--
ALTER TABLE `tt_box_open_chance`
  ADD PRIMARY KEY (`ornament_id`) USING BTREE;

--
-- 表的索引 `tt_box_open_chance_0812`
--
ALTER TABLE `tt_box_open_chance_0812`
  ADD PRIMARY KEY (`ornament_id`) USING BTREE;

--
-- 表的索引 `tt_box_ornaments`
--
ALTER TABLE `tt_box_ornaments`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_box_records`
--
ALTER TABLE `tt_box_records`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_box_records_0812`
--
ALTER TABLE `tt_box_records_0812`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_box_third_explosive_user`
--
ALTER TABLE `tt_box_third_explosive_user`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_box_type`
--
ALTER TABLE `tt_box_type`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_commission_record`
--
ALTER TABLE `tt_commission_record`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_commission_record_0812`
--
ALTER TABLE `tt_commission_record_0812`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_comp_record`
--
ALTER TABLE `tt_comp_record`
  ADD PRIMARY KEY (`user_id`,`box_id`) USING BTREE;

--
-- 表的索引 `tt_comp_record_0812`
--
ALTER TABLE `tt_comp_record_0812`
  ADD PRIMARY KEY (`user_id`,`box_id`) USING BTREE;

--
-- 表的索引 `tt_content`
--
ALTER TABLE `tt_content`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_content_type`
--
ALTER TABLE `tt_content_type`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_delivery_record`
--
ALTER TABLE `tt_delivery_record`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_delivery_record_0812`
--
ALTER TABLE `tt_delivery_record_0812`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_exponent`
--
ALTER TABLE `tt_exponent`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_exponent_user`
--
ALTER TABLE `tt_exponent_user`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_exponent_user_box`
--
ALTER TABLE `tt_exponent_user_box`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_fight`
--
ALTER TABLE `tt_fight`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_fight_0812`
--
ALTER TABLE `tt_fight_0812`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_fight_ranking_reward`
--
ALTER TABLE `tt_fight_ranking_reward`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_fight_result`
--
ALTER TABLE `tt_fight_result`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_fight_round`
--
ALTER TABLE `tt_fight_round`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_fight_user`
--
ALTER TABLE `tt_fight_user`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_fight_user_0812`
--
ALTER TABLE `tt_fight_user_0812`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_first_recharge`
--
ALTER TABLE `tt_first_recharge`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_first_recharge_0812`
--
ALTER TABLE `tt_first_recharge_0812`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_game_mould`
--
ALTER TABLE `tt_game_mould`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_game_mould_box`
--
ALTER TABLE `tt_game_mould_box`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_message`
--
ALTER TABLE `tt_message`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_message_send`
--
ALTER TABLE `tt_message_send`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_notice`
--
ALTER TABLE `tt_notice`
  ADD PRIMARY KEY (`notice_id`) USING BTREE;

--
-- 表的索引 `tt_notice_0812`
--
ALTER TABLE `tt_notice_0812`
  ADD PRIMARY KEY (`notice_id`) USING BTREE;

--
-- 表的索引 `tt_order`
--
ALTER TABLE `tt_order`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_order_0812`
--
ALTER TABLE `tt_order_0812`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_ornament`
--
ALTER TABLE `tt_ornament`
  ADD PRIMARY KEY (`market_hash_name`) USING BTREE,
  ADD UNIQUE KEY `id` (`id`) USING BTREE;

--
-- 表的索引 `tt_ornaments_level`
--
ALTER TABLE `tt_ornaments_level`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_ornament_yy`
--
ALTER TABLE `tt_ornament_yy`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_ornament_zbt`
--
ALTER TABLE `tt_ornament_zbt`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_promotion_level`
--
ALTER TABLE `tt_promotion_level`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_promotion_record`
--
ALTER TABLE `tt_promotion_record`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_promotion_update`
--
ALTER TABLE `tt_promotion_update`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_recharge_card`
--
ALTER TABLE `tt_recharge_card`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD UNIQUE KEY `unique_password` (`password`) USING BTREE COMMENT '唯一约束（卡密）';

--
-- 表的索引 `tt_recharge_card_0812`
--
ALTER TABLE `tt_recharge_card_0812`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD UNIQUE KEY `unique_password` (`password`) USING BTREE COMMENT '唯一约束（卡密）';

--
-- 表的索引 `tt_recharge_config`
--
ALTER TABLE `tt_recharge_config`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_recharge_prod`
--
ALTER TABLE `tt_recharge_prod`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_recharge_ranking_reward`
--
ALTER TABLE `tt_recharge_ranking_reward`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_recharge_ranking_reward_0812`
--
ALTER TABLE `tt_recharge_ranking_reward_0812`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_recharge_record`
--
ALTER TABLE `tt_recharge_record`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_recharge_record_0812`
--
ALTER TABLE `tt_recharge_record_0812`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_red_pack`
--
ALTER TABLE `tt_red_pack`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_red_packet`
--
ALTER TABLE `tt_red_packet`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_red_packet_0812`
--
ALTER TABLE `tt_red_packet_0812`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_red_packet_record`
--
ALTER TABLE `tt_red_packet_record`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_red_packet_record_0812`
--
ALTER TABLE `tt_red_packet_record_0812`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_red_pack_0812`
--
ALTER TABLE `tt_red_pack_0812`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_replacement_record`
--
ALTER TABLE `tt_replacement_record`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_replacement_record_0812`
--
ALTER TABLE `tt_replacement_record_0812`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_robot_fight_group`
--
ALTER TABLE `tt_robot_fight_group`
  ADD PRIMARY KEY (`group_id`) USING BTREE;

--
-- 表的索引 `tt_robot_fight_group_0812`
--
ALTER TABLE `tt_robot_fight_group_0812`
  ADD PRIMARY KEY (`group_id`) USING BTREE;

--
-- 表的索引 `tt_robot_fight_group_box`
--
ALTER TABLE `tt_robot_fight_group_box`
  ADD PRIMARY KEY (`group_id`,`box_id`) USING BTREE;

--
-- 表的索引 `tt_robot_fight_group_box_0812`
--
ALTER TABLE `tt_robot_fight_group_box_0812`
  ADD PRIMARY KEY (`group_id`,`box_id`) USING BTREE;

--
-- 表的索引 `tt_roll`
--
ALTER TABLE `tt_roll`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_roll_0812`
--
ALTER TABLE `tt_roll_0812`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_roll_jackpot`
--
ALTER TABLE `tt_roll_jackpot`
  ADD PRIMARY KEY (`jackpot_id`) USING BTREE;

--
-- 表的索引 `tt_roll_jackpot_0812`
--
ALTER TABLE `tt_roll_jackpot_0812`
  ADD PRIMARY KEY (`jackpot_id`) USING BTREE;

--
-- 表的索引 `tt_roll_jackpot_ornaments`
--
ALTER TABLE `tt_roll_jackpot_ornaments`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_roll_jackpot_ornaments_0812`
--
ALTER TABLE `tt_roll_jackpot_ornaments_0812`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_roll_user`
--
ALTER TABLE `tt_roll_user`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_roll_user_prize`
--
ALTER TABLE `tt_roll_user_prize`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_roll_user_prize_0812`
--
ALTER TABLE `tt_roll_user_prize_0812`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_task_center`
--
ALTER TABLE `tt_task_center`
  ADD PRIMARY KEY (`task_id`) USING BTREE;

--
-- 表的索引 `tt_task_center_user`
--
ALTER TABLE `tt_task_center_user`
  ADD PRIMARY KEY (`user_id`,`task_id`) USING BTREE;

--
-- 表的索引 `tt_task_center_user_0812`
--
ALTER TABLE `tt_task_center_user_0812`
  ADD PRIMARY KEY (`user_id`,`task_id`) USING BTREE;

--
-- 表的索引 `tt_time_roll`
--
ALTER TABLE `tt_time_roll`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_time_roll_0812`
--
ALTER TABLE `tt_time_roll_0812`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_time_roll_user`
--
ALTER TABLE `tt_time_roll_user`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_upgrade_fail_ornaments`
--
ALTER TABLE `tt_upgrade_fail_ornaments`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_upgrade_fail_ornaments_0812`
--
ALTER TABLE `tt_upgrade_fail_ornaments_0812`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_upgrade_ornaments`
--
ALTER TABLE `tt_upgrade_ornaments`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_upgrade_ornaments_0812`
--
ALTER TABLE `tt_upgrade_ornaments_0812`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_upgrade_record`
--
ALTER TABLE `tt_upgrade_record`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_upgrade_record_0812`
--
ALTER TABLE `tt_upgrade_record_0812`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_user`
--
ALTER TABLE `tt_user`
  ADD PRIMARY KEY (`user_id`) USING BTREE,
  ADD UNIQUE KEY `unique_invitation_code` (`invitation_code`) USING BTREE COMMENT '唯一约束（邀请码）',
  ADD UNIQUE KEY `unique_user_name` (`user_name`) USING BTREE COMMENT '唯一约束（用户名称）',
  ADD UNIQUE KEY `unique_phone_number` (`phone_number`) USING BTREE COMMENT '唯一约束（用户手机号）';

--
-- 表的索引 `tt_user_0812`
--
ALTER TABLE `tt_user_0812`
  ADD PRIMARY KEY (`user_id`) USING BTREE,
  ADD UNIQUE KEY `unique_invitation_code` (`invitation_code`) USING BTREE COMMENT '唯一约束（邀请码）',
  ADD UNIQUE KEY `unique_user_name` (`user_name`) USING BTREE COMMENT '唯一约束（用户名称）',
  ADD UNIQUE KEY `unique_phone_number` (`phone_number`) USING BTREE COMMENT '唯一约束（用户手机号）';

--
-- 表的索引 `tt_user_amount_records`
--
ALTER TABLE `tt_user_amount_records`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_user_amount_records_0812`
--
ALTER TABLE `tt_user_amount_records_0812`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_user_avatar`
--
ALTER TABLE `tt_user_avatar`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_user_blend_ercash`
--
ALTER TABLE `tt_user_blend_ercash`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_user_blend_ercash_0812`
--
ALTER TABLE `tt_user_blend_ercash_0812`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_user_box_open_chance`
--
ALTER TABLE `tt_user_box_open_chance`
  ADD PRIMARY KEY (`user_id`,`box_id`) USING BTREE;

--
-- 表的索引 `tt_user_box_open_chance_0812`
--
ALTER TABLE `tt_user_box_open_chance_0812`
  ADD PRIMARY KEY (`user_id`,`box_id`) USING BTREE;

--
-- 表的索引 `tt_user_credits_records`
--
ALTER TABLE `tt_user_credits_records`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_user_credits_records_0812`
--
ALTER TABLE `tt_user_credits_records_0812`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_user_label`
--
ALTER TABLE `tt_user_label`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_vip_level`
--
ALTER TABLE `tt_vip_level`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- 表的索引 `tt_welfare`
--
ALTER TABLE `tt_welfare`
  ADD PRIMARY KEY (`welfare_id`) USING BTREE;

--
-- 表的索引 `tt_welfare_0812`
--
ALTER TABLE `tt_welfare_0812`
  ADD PRIMARY KEY (`welfare_id`) USING BTREE;

--
-- 表的索引 `tt_welfare_monthly_recharges`
--
ALTER TABLE `tt_welfare_monthly_recharges`
  ADD PRIMARY KEY (`welfare_id`) USING BTREE;

--
-- 表的索引 `tt_welfare_monthly_recharges_0812`
--
ALTER TABLE `tt_welfare_monthly_recharges_0812`
  ADD PRIMARY KEY (`welfare_id`) USING BTREE;

--
-- 表的索引 `tt_welfare_record`
--
ALTER TABLE `tt_welfare_record`
  ADD PRIMARY KEY (`welfare_record_id`) USING BTREE;

--
-- 表的索引 `tt_welfare_record_0812`
--
ALTER TABLE `tt_welfare_record_0812`
  ADD PRIMARY KEY (`welfare_record_id`) USING BTREE;

--
-- 表的索引 `tt_welfare_vip_level`
--
ALTER TABLE `tt_welfare_vip_level`
  ADD PRIMARY KEY (`welfare_id`) USING BTREE;

--
-- 表的索引 `tt_welfare_vip_level_0812`
--
ALTER TABLE `tt_welfare_vip_level_0812`
  ADD PRIMARY KEY (`welfare_id`) USING BTREE;

--
-- 在导出的表使用AUTO_INCREMENT
--

--
-- 使用表AUTO_INCREMENT `game_sugar_spin`
--
ALTER TABLE `game_sugar_spin`
  MODIFY `gid` bigint NOT NULL AUTO_INCREMENT COMMENT 'spinfree_spinspin';

--
-- 使用表AUTO_INCREMENT `game_sugar_spin_free`
--
ALTER TABLE `game_sugar_spin_free`
  MODIFY `gid` bigint NOT NULL AUTO_INCREMENT COMMENT 'spinfree_spinspin';

--
-- 使用表AUTO_INCREMENT `game_sugar_spin_super`
--
ALTER TABLE `game_sugar_spin_super`
  MODIFY `gid` bigint NOT NULL AUTO_INCREMENT COMMENT 'spinfree_spinspin';

--
-- 使用表AUTO_INCREMENT `game_sugar_step_info`
--
ALTER TABLE `game_sugar_step_info`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id';

--
-- 使用表AUTO_INCREMENT `game_sugar_step_info_free`
--
ALTER TABLE `game_sugar_step_info_free`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id';

--
-- 使用表AUTO_INCREMENT `game_sugar_step_info_super`
--
ALTER TABLE `game_sugar_step_info_super`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id';

--
-- 使用表AUTO_INCREMENT `game_sugar_user`
--
ALTER TABLE `game_sugar_user`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id';

--
-- 使用表AUTO_INCREMENT `game_sugar_win`
--
ALTER TABLE `game_sugar_win`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id';

--
-- 使用表AUTO_INCREMENT `game_wheel_round`
--
ALTER TABLE `game_wheel_round`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT COMMENT '唯一自增id';

--
-- 使用表AUTO_INCREMENT `game_wheel_round_bet`
--
ALTER TABLE `game_wheel_round_bet`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT COMMENT '唯一自增id';

--
-- 使用表AUTO_INCREMENT `game_wheel_user`
--
ALTER TABLE `game_wheel_user`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id';

--
-- 使用表AUTO_INCREMENT `gen_table`
--
ALTER TABLE `gen_table`
  MODIFY `table_id` bigint NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `gen_table_column`
--
ALTER TABLE `gen_table_column`
  MODIFY `column_id` bigint NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `sys_config`
--
ALTER TABLE `sys_config`
  MODIFY `config_id` int NOT NULL AUTO_INCREMENT COMMENT '参数主键';

--
-- 使用表AUTO_INCREMENT `sys_dept`
--
ALTER TABLE `sys_dept`
  MODIFY `dept_id` bigint NOT NULL AUTO_INCREMENT COMMENT '部门id';

--
-- 使用表AUTO_INCREMENT `sys_dict_data`
--
ALTER TABLE `sys_dict_data`
  MODIFY `dict_code` bigint NOT NULL AUTO_INCREMENT COMMENT '字典编码';

--
-- 使用表AUTO_INCREMENT `sys_dict_type`
--
ALTER TABLE `sys_dict_type`
  MODIFY `dict_id` bigint NOT NULL AUTO_INCREMENT COMMENT '字典主键';

--
-- 使用表AUTO_INCREMENT `sys_job`
--
ALTER TABLE `sys_job`
  MODIFY `job_id` bigint NOT NULL AUTO_INCREMENT COMMENT '任务ID';

--
-- 使用表AUTO_INCREMENT `sys_job_log`
--
ALTER TABLE `sys_job_log`
  MODIFY `job_log_id` bigint NOT NULL AUTO_INCREMENT COMMENT '任务日志ID';

--
-- 使用表AUTO_INCREMENT `sys_logininfor`
--
ALTER TABLE `sys_logininfor`
  MODIFY `info_id` bigint NOT NULL AUTO_INCREMENT COMMENT '访问ID';

--
-- 使用表AUTO_INCREMENT `sys_menu`
--
ALTER TABLE `sys_menu`
  MODIFY `menu_id` bigint NOT NULL AUTO_INCREMENT COMMENT '菜单ID';

--
-- 使用表AUTO_INCREMENT `sys_notice`
--
ALTER TABLE `sys_notice`
  MODIFY `notice_id` int NOT NULL AUTO_INCREMENT COMMENT '公告ID';

--
-- 使用表AUTO_INCREMENT `sys_oper_log`
--
ALTER TABLE `sys_oper_log`
  MODIFY `oper_id` bigint NOT NULL AUTO_INCREMENT COMMENT '日志主键';

--
-- 使用表AUTO_INCREMENT `sys_post`
--
ALTER TABLE `sys_post`
  MODIFY `post_id` bigint NOT NULL AUTO_INCREMENT COMMENT '岗位ID';

--
-- 使用表AUTO_INCREMENT `sys_role`
--
ALTER TABLE `sys_role`
  MODIFY `role_id` bigint NOT NULL AUTO_INCREMENT COMMENT '角色ID';

--
-- 使用表AUTO_INCREMENT `sys_user`
--
ALTER TABLE `sys_user`
  MODIFY `user_id` bigint NOT NULL AUTO_INCREMENT COMMENT '用户ID';

--
-- 使用表AUTO_INCREMENT `tt_advertisement`
--
ALTER TABLE `tt_advertisement`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_announcement`
--
ALTER TABLE `tt_announcement`
  MODIFY `announcement_id` int NOT NULL AUTO_INCREMENT COMMENT '公告ID';

--
-- 使用表AUTO_INCREMENT `tt_announcement_0812`
--
ALTER TABLE `tt_announcement_0812`
  MODIFY `announcement_id` int NOT NULL AUTO_INCREMENT COMMENT '公告ID';

--
-- 使用表AUTO_INCREMENT `tt_attendance_record`
--
ALTER TABLE `tt_attendance_record`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_attendance_record_0812`
--
ALTER TABLE `tt_attendance_record_0812`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_banner`
--
ALTER TABLE `tt_banner`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_bonus`
--
ALTER TABLE `tt_bonus`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_bonus_0812`
--
ALTER TABLE `tt_bonus_0812`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_bonus_receive_record`
--
ALTER TABLE `tt_bonus_receive_record`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_bonus_receive_record_0812`
--
ALTER TABLE `tt_bonus_receive_record_0812`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_box`
--
ALTER TABLE `tt_box`
  MODIFY `box_id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_box_ornaments`
--
ALTER TABLE `tt_box_ornaments`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_box_records`
--
ALTER TABLE `tt_box_records`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_box_records_0812`
--
ALTER TABLE `tt_box_records_0812`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_box_third_explosive_user`
--
ALTER TABLE `tt_box_third_explosive_user`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_box_type`
--
ALTER TABLE `tt_box_type`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_commission_record`
--
ALTER TABLE `tt_commission_record`
  MODIFY `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID';

--
-- 使用表AUTO_INCREMENT `tt_commission_record_0812`
--
ALTER TABLE `tt_commission_record_0812`
  MODIFY `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID';

--
-- 使用表AUTO_INCREMENT `tt_content`
--
ALTER TABLE `tt_content`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_content_type`
--
ALTER TABLE `tt_content_type`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_delivery_record`
--
ALTER TABLE `tt_delivery_record`
  MODIFY `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID';

--
-- 使用表AUTO_INCREMENT `tt_delivery_record_0812`
--
ALTER TABLE `tt_delivery_record_0812`
  MODIFY `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID';

--
-- 使用表AUTO_INCREMENT `tt_exponent`
--
ALTER TABLE `tt_exponent`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_exponent_user`
--
ALTER TABLE `tt_exponent_user`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_exponent_user_box`
--
ALTER TABLE `tt_exponent_user_box`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_fight`
--
ALTER TABLE `tt_fight`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_fight_0812`
--
ALTER TABLE `tt_fight_0812`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_fight_ranking_reward`
--
ALTER TABLE `tt_fight_ranking_reward`
  MODIFY `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID';

--
-- 使用表AUTO_INCREMENT `tt_fight_result`
--
ALTER TABLE `tt_fight_result`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_fight_user`
--
ALTER TABLE `tt_fight_user`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_fight_user_0812`
--
ALTER TABLE `tt_fight_user_0812`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_first_recharge`
--
ALTER TABLE `tt_first_recharge`
  MODIFY `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID';

--
-- 使用表AUTO_INCREMENT `tt_first_recharge_0812`
--
ALTER TABLE `tt_first_recharge_0812`
  MODIFY `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID';

--
-- 使用表AUTO_INCREMENT `tt_game_mould`
--
ALTER TABLE `tt_game_mould`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_game_mould_box`
--
ALTER TABLE `tt_game_mould_box`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_message`
--
ALTER TABLE `tt_message`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_message_send`
--
ALTER TABLE `tt_message_send`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_notice`
--
ALTER TABLE `tt_notice`
  MODIFY `notice_id` int NOT NULL AUTO_INCREMENT COMMENT '通知ID';

--
-- 使用表AUTO_INCREMENT `tt_notice_0812`
--
ALTER TABLE `tt_notice_0812`
  MODIFY `notice_id` int NOT NULL AUTO_INCREMENT COMMENT '通知ID';

--
-- 使用表AUTO_INCREMENT `tt_order`
--
ALTER TABLE `tt_order`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_order_0812`
--
ALTER TABLE `tt_order_0812`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_ornaments_level`
--
ALTER TABLE `tt_ornaments_level`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_ornament_yy`
--
ALTER TABLE `tt_ornament_yy`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_ornament_zbt`
--
ALTER TABLE `tt_ornament_zbt`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'hash转码得到';

--
-- 使用表AUTO_INCREMENT `tt_promotion_level`
--
ALTER TABLE `tt_promotion_level`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_promotion_record`
--
ALTER TABLE `tt_promotion_record`
  MODIFY `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID';

--
-- 使用表AUTO_INCREMENT `tt_promotion_update`
--
ALTER TABLE `tt_promotion_update`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_recharge_card`
--
ALTER TABLE `tt_recharge_card`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_recharge_card_0812`
--
ALTER TABLE `tt_recharge_card_0812`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_recharge_config`
--
ALTER TABLE `tt_recharge_config`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_recharge_prod`
--
ALTER TABLE `tt_recharge_prod`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_recharge_ranking_reward`
--
ALTER TABLE `tt_recharge_ranking_reward`
  MODIFY `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID';

--
-- 使用表AUTO_INCREMENT `tt_recharge_ranking_reward_0812`
--
ALTER TABLE `tt_recharge_ranking_reward_0812`
  MODIFY `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID';

--
-- 使用表AUTO_INCREMENT `tt_recharge_record`
--
ALTER TABLE `tt_recharge_record`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_recharge_record_0812`
--
ALTER TABLE `tt_recharge_record_0812`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_red_pack`
--
ALTER TABLE `tt_red_pack`
  MODIFY `id` int NOT NULL AUTO_INCREMENT COMMENT '主键';

--
-- 使用表AUTO_INCREMENT `tt_red_packet`
--
ALTER TABLE `tt_red_packet`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_red_packet_0812`
--
ALTER TABLE `tt_red_packet_0812`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_red_packet_record`
--
ALTER TABLE `tt_red_packet_record`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_red_packet_record_0812`
--
ALTER TABLE `tt_red_packet_record_0812`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_red_pack_0812`
--
ALTER TABLE `tt_red_pack_0812`
  MODIFY `id` int NOT NULL AUTO_INCREMENT COMMENT '主键';

--
-- 使用表AUTO_INCREMENT `tt_replacement_record`
--
ALTER TABLE `tt_replacement_record`
  MODIFY `id` int NOT NULL AUTO_INCREMENT COMMENT 'id';

--
-- 使用表AUTO_INCREMENT `tt_replacement_record_0812`
--
ALTER TABLE `tt_replacement_record_0812`
  MODIFY `id` int NOT NULL AUTO_INCREMENT COMMENT 'id';

--
-- 使用表AUTO_INCREMENT `tt_robot_fight_group`
--
ALTER TABLE `tt_robot_fight_group`
  MODIFY `group_id` int NOT NULL AUTO_INCREMENT COMMENT '分组ID';

--
-- 使用表AUTO_INCREMENT `tt_robot_fight_group_0812`
--
ALTER TABLE `tt_robot_fight_group_0812`
  MODIFY `group_id` int NOT NULL AUTO_INCREMENT COMMENT '分组ID';

--
-- 使用表AUTO_INCREMENT `tt_roll`
--
ALTER TABLE `tt_roll`
  MODIFY `id` int NOT NULL AUTO_INCREMENT COMMENT 'ROLL房ID';

--
-- 使用表AUTO_INCREMENT `tt_roll_0812`
--
ALTER TABLE `tt_roll_0812`
  MODIFY `id` int NOT NULL AUTO_INCREMENT COMMENT 'ROLL房ID';

--
-- 使用表AUTO_INCREMENT `tt_roll_jackpot`
--
ALTER TABLE `tt_roll_jackpot`
  MODIFY `jackpot_id` int NOT NULL AUTO_INCREMENT COMMENT '奖池ID';

--
-- 使用表AUTO_INCREMENT `tt_roll_jackpot_0812`
--
ALTER TABLE `tt_roll_jackpot_0812`
  MODIFY `jackpot_id` int NOT NULL AUTO_INCREMENT COMMENT '奖池ID';

--
-- 使用表AUTO_INCREMENT `tt_roll_jackpot_ornaments`
--
ALTER TABLE `tt_roll_jackpot_ornaments`
  MODIFY `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID';

--
-- 使用表AUTO_INCREMENT `tt_roll_jackpot_ornaments_0812`
--
ALTER TABLE `tt_roll_jackpot_ornaments_0812`
  MODIFY `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID';

--
-- 使用表AUTO_INCREMENT `tt_roll_user`
--
ALTER TABLE `tt_roll_user`
  MODIFY `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID';

--
-- 使用表AUTO_INCREMENT `tt_roll_user_prize`
--
ALTER TABLE `tt_roll_user_prize`
  MODIFY `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID';

--
-- 使用表AUTO_INCREMENT `tt_roll_user_prize_0812`
--
ALTER TABLE `tt_roll_user_prize_0812`
  MODIFY `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID';

--
-- 使用表AUTO_INCREMENT `tt_task_center`
--
ALTER TABLE `tt_task_center`
  MODIFY `task_id` int NOT NULL AUTO_INCREMENT COMMENT '任务ID';

--
-- 使用表AUTO_INCREMENT `tt_time_roll`
--
ALTER TABLE `tt_time_roll`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_time_roll_0812`
--
ALTER TABLE `tt_time_roll_0812`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_time_roll_user`
--
ALTER TABLE `tt_time_roll_user`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_upgrade_fail_ornaments`
--
ALTER TABLE `tt_upgrade_fail_ornaments`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_upgrade_fail_ornaments_0812`
--
ALTER TABLE `tt_upgrade_fail_ornaments_0812`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_upgrade_ornaments`
--
ALTER TABLE `tt_upgrade_ornaments`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_upgrade_ornaments_0812`
--
ALTER TABLE `tt_upgrade_ornaments_0812`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_upgrade_record`
--
ALTER TABLE `tt_upgrade_record`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_upgrade_record_0812`
--
ALTER TABLE `tt_upgrade_record_0812`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_user`
--
ALTER TABLE `tt_user`
  MODIFY `user_id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_user_0812`
--
ALTER TABLE `tt_user_0812`
  MODIFY `user_id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_user_amount_records`
--
ALTER TABLE `tt_user_amount_records`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_user_amount_records_0812`
--
ALTER TABLE `tt_user_amount_records_0812`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_user_avatar`
--
ALTER TABLE `tt_user_avatar`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_user_blend_ercash`
--
ALTER TABLE `tt_user_blend_ercash`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_user_blend_ercash_0812`
--
ALTER TABLE `tt_user_blend_ercash_0812`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_user_credits_records`
--
ALTER TABLE `tt_user_credits_records`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_user_credits_records_0812`
--
ALTER TABLE `tt_user_credits_records_0812`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_user_label`
--
ALTER TABLE `tt_user_label`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_vip_level`
--
ALTER TABLE `tt_vip_level`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `tt_welfare`
--
ALTER TABLE `tt_welfare`
  MODIFY `welfare_id` int NOT NULL AUTO_INCREMENT COMMENT '福利ID';

--
-- 使用表AUTO_INCREMENT `tt_welfare_0812`
--
ALTER TABLE `tt_welfare_0812`
  MODIFY `welfare_id` int NOT NULL AUTO_INCREMENT COMMENT '福利ID';

--
-- 使用表AUTO_INCREMENT `tt_welfare_monthly_recharges`
--
ALTER TABLE `tt_welfare_monthly_recharges`
  MODIFY `welfare_id` int NOT NULL AUTO_INCREMENT COMMENT '福利ID';

--
-- 使用表AUTO_INCREMENT `tt_welfare_monthly_recharges_0812`
--
ALTER TABLE `tt_welfare_monthly_recharges_0812`
  MODIFY `welfare_id` int NOT NULL AUTO_INCREMENT COMMENT '福利ID';

--
-- 使用表AUTO_INCREMENT `tt_welfare_record`
--
ALTER TABLE `tt_welfare_record`
  MODIFY `welfare_record_id` int NOT NULL AUTO_INCREMENT COMMENT '福利领取记录ID';

--
-- 使用表AUTO_INCREMENT `tt_welfare_record_0812`
--
ALTER TABLE `tt_welfare_record_0812`
  MODIFY `welfare_record_id` int NOT NULL AUTO_INCREMENT COMMENT '福利领取记录ID';

--
-- 使用表AUTO_INCREMENT `tt_welfare_vip_level`
--
ALTER TABLE `tt_welfare_vip_level`
  MODIFY `welfare_id` int NOT NULL AUTO_INCREMENT COMMENT '福利ID';

--
-- 使用表AUTO_INCREMENT `tt_welfare_vip_level_0812`
--
ALTER TABLE `tt_welfare_vip_level_0812`
  MODIFY `welfare_id` int NOT NULL AUTO_INCREMENT COMMENT '福利ID';

--
-- 限制导出的表
--

--
-- 限制表 `qrtz_blob_triggers`
--
ALTER TABLE `qrtz_blob_triggers`
  ADD CONSTRAINT `QRTZ_BLOB_TRIGGERS_ibfk_1` FOREIGN KEY (`sched_name`,`trigger_name`,`trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`) ON DELETE RESTRICT ON UPDATE RESTRICT;

--
-- 限制表 `qrtz_cron_triggers`
--
ALTER TABLE `qrtz_cron_triggers`
  ADD CONSTRAINT `QRTZ_CRON_TRIGGERS_ibfk_1` FOREIGN KEY (`sched_name`,`trigger_name`,`trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`) ON DELETE RESTRICT ON UPDATE RESTRICT;

--
-- 限制表 `qrtz_simple_triggers`
--
ALTER TABLE `qrtz_simple_triggers`
  ADD CONSTRAINT `QRTZ_SIMPLE_TRIGGERS_ibfk_1` FOREIGN KEY (`sched_name`,`trigger_name`,`trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`) ON DELETE RESTRICT ON UPDATE RESTRICT;

--
-- 限制表 `qrtz_simprop_triggers`
--
ALTER TABLE `qrtz_simprop_triggers`
  ADD CONSTRAINT `QRTZ_SIMPROP_TRIGGERS_ibfk_1` FOREIGN KEY (`sched_name`,`trigger_name`,`trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`) ON DELETE RESTRICT ON UPDATE RESTRICT;

--
-- 限制表 `qrtz_triggers`
--
ALTER TABLE `qrtz_triggers`
  ADD CONSTRAINT `QRTZ_TRIGGERS_ibfk_1` FOREIGN KEY (`sched_name`,`job_name`,`job_group`) REFERENCES `qrtz_job_details` (`sched_name`, `job_name`, `job_group`) ON DELETE RESTRICT ON UPDATE RESTRICT;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
