/*
Navicat MySQL Data Transfer

Source Server         : localhost
Source Server Version : 50726
Source Host           : localhost:3306
Source Database       : jpxy_agency

Target Server Type    : MYSQL
Target Server Version : 50726
File Encoding         : 65001

Date: 2022-01-21 20:08:36
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for agency_admin_log
-- ----------------------------
DROP TABLE IF EXISTS `agency_admin_log`;
CREATE TABLE `agency_admin_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_user_id` int(10) NOT NULL COMMENT '用户',
  `name` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '操作',
  `url` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'URL',
  `log_method` varchar(8) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '不记录' COMMENT '记录日志方法',
  `log_ip` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '操作IP',
  `create_time` int(10) NOT NULL COMMENT '操作时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='后台操作日志';

-- ----------------------------
-- Records of agency_admin_log
-- ----------------------------

-- ----------------------------
-- Table structure for agency_admin_log_data
-- ----------------------------
DROP TABLE IF EXISTS `agency_admin_log_data`;
CREATE TABLE `agency_admin_log_data` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_log_id` int(11) NOT NULL COMMENT '日志ID',
  `data` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '日志内容',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='后台操作日志数据';

-- ----------------------------
-- Records of agency_admin_log_data
-- ----------------------------

-- ----------------------------
-- Table structure for agency_admin_menu
-- ----------------------------
DROP TABLE IF EXISTS `agency_admin_menu`;
CREATE TABLE `agency_admin_menu` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) NOT NULL DEFAULT '0' COMMENT '父级菜单',
  `name` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '名称',
  `url` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'url',
  `icon` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'fa-list' COMMENT '图标',
  `is_show` tinyint(1) NOT NULL DEFAULT '1' COMMENT '等级',
  `sort_id` int(10) NOT NULL DEFAULT '1000' COMMENT '排序',
  `log_method` varchar(8) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '不记录' COMMENT '记录日志方法',
  PRIMARY KEY (`id`),
  KEY `index_url` (`url`)
) ENGINE=InnoDB AUTO_INCREMENT=162 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='后台菜单';

-- ----------------------------
-- Records of agency_admin_menu
-- ----------------------------
INSERT INTO `agency_admin_menu` VALUES ('1', '0', '后台首页', 'admin/index/index', 'fa-home', '1', '99', '不记录');
INSERT INTO `agency_admin_menu` VALUES ('2', '0', '系统管理', 'admin/sys', 'fa-desktop', '1', '1099', '不记录');
INSERT INTO `agency_admin_menu` VALUES ('3', '2', '用户管理', 'admin/admin_user/index', 'fa-user', '1', '1000', '不记录');
INSERT INTO `agency_admin_menu` VALUES ('4', '3', '添加用户', 'admin/admin_user/add', 'fa-plus', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('5', '3', '修改用户', 'admin/admin_user/edit', 'fa-edit', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('6', '3', '删除用户', 'admin/admin_user/del', 'fa-close', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('7', '2', '角色管理', 'admin/admin_role/index', 'fa-group', '1', '1000', '不记录');
INSERT INTO `agency_admin_menu` VALUES ('8', '7', '添加角色', 'admin/admin_role/add', 'fa-plus', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('9', '7', '修改角色', 'admin/admin_role/edit', 'fa-edit', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('10', '7', '删除角色', 'admin/admin_role/del', 'fa-close', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('11', '7', '角色授权', 'admin/admin_role/access', 'fa-key', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('16', '2', '操作日志', 'admin/admin_log/index', 'fa-keyboard-o', '1', '1000', '不记录');
INSERT INTO `agency_admin_menu` VALUES ('17', '16', '查看操作日志详情', 'admin/admin_log/view', 'fa-search-plus', '0', '1000', '不记录');
INSERT INTO `agency_admin_menu` VALUES ('18', '2', '个人资料', 'admin/admin_user/profile', 'fa-smile-o', '1', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('19', '0', '玩家管理', 'admin/user/mange', 'fa-users', '1', '1000', '不记录');
INSERT INTO `agency_admin_menu` VALUES ('20', '19', '账号列表', 'admin/user/index', 'fa-user', '1', '1000', '不记录');
INSERT INTO `agency_admin_menu` VALUES ('23', '20', '删除账号', 'admin/user/del', 'fa-trash', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('24', '20', '启用账号', 'admin/user/enable', 'fa-circle', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('25', '20', '禁用账号', 'admin/user/disable', 'fa-circle', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('32', '2', '开发管理', 'admin/develop/manager', 'fa-code', '1', '1005', '不记录');
INSERT INTO `agency_admin_menu` VALUES ('33', '32', '代码生成', 'admin/generate/index', 'fa-file-code-o', '1', '1000', '不记录');
INSERT INTO `agency_admin_menu` VALUES ('34', '32', '设置配置', 'admin/develop/setting', 'fa-cogs', '1', '995', '不记录');
INSERT INTO `agency_admin_menu` VALUES ('35', '34', '设置管理', 'admin/setting/index', 'fa-cog', '1', '1000', '不记录');
INSERT INTO `agency_admin_menu` VALUES ('36', '35', '添加设置', 'admin/setting/add', 'fa-plus', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('37', '35', '修改设置', 'admin/setting/edit', 'fa-pencil', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('38', '35', '删除设置', 'admin/setting/del', 'fa-trash', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('39', '34', '设置分组管理', 'admin/setting_group/index', 'fa-list', '1', '1000', '不记录');
INSERT INTO `agency_admin_menu` VALUES ('40', '39', '添加设置分组', 'admin/setting_group/add', 'fa-plus', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('41', '39', '修改设置分组', 'admin/setting_group/edit', 'fa-pencil', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('42', '39', '删除设置分组', 'admin/setting_group/del', 'fa-trash', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('43', '0', '设置中心', 'admin/setting/center', 'fa-cogs', '1', '1000', '不记录');
INSERT INTO `agency_admin_menu` VALUES ('44', '43', '所有配置', 'admin/setting/all', 'fa-list', '1', '1000', '不记录');
INSERT INTO `agency_admin_menu` VALUES ('47', '43', '后台设置', 'admin/setting/admin', 'fa-adjust', '1', '1000', '不记录');
INSERT INTO `agency_admin_menu` VALUES ('48', '43', '更新设置', 'admin/setting/update', 'fa-pencil', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('49', '32', '数据维护', 'admin/database/table', 'fa-database', '1', '1000', '不记录');
INSERT INTO `agency_admin_menu` VALUES ('50', '49', '查看表详情', 'admin/database/view', 'fa-eye', '0', '1000', '不记录');
INSERT INTO `agency_admin_menu` VALUES ('51', '49', '优化表', 'admin/database/optimize', 'fa-refresh', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('52', '49', '修复表', 'admin/database/repair', 'fa-circle-o-notch', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('61', '0', '代理管理', 'admin/agency', 'fa-address-card-o', '1', '100', '不记录');
INSERT INTO `agency_admin_menu` VALUES ('70', '61', '代理列表', 'admin/agency/index', 'fa-user', '1', '1000', 'GET');
INSERT INTO `agency_admin_menu` VALUES ('71', '70', '添加', 'admin/agency/add', 'fa-plus', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('72', '70', '修改', 'admin/agency/edit', 'fa-pencil', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('73', '70', '删除', 'admin/agency/del', 'fa-trash', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('80', '0', '游戏管理', 'admin/game', 'fa-gamepad', '1', '1000', 'GET');
INSERT INTO `agency_admin_menu` VALUES ('87', '19', '角色列表', 'admin/player/index', 'fa-list', '1', '1000', 'GET');
INSERT INTO `agency_admin_menu` VALUES ('88', '80', 'GM工具', 'admin/game_gm/index', 'fa-circle-o', '1', '1000', 'GET');
INSERT INTO `agency_admin_menu` VALUES ('89', '0', 'CDK管理', 'admin/cdk', 'fa-credit-card', '1', '1000', 'GET');
INSERT INTO `agency_admin_menu` VALUES ('90', '89', 'CDK列表', 'admin/cdk/index', 'fa-circle-o', '1', '1000', 'GET');
INSERT INTO `agency_admin_menu` VALUES ('91', '90', '添加', 'admin/cdk/add', 'fa-list', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('92', '89', '兑换记录', 'admin/cdk_record/index', 'fa-bar-chart-o', '1', '1000', 'GET');
INSERT INTO `agency_admin_menu` VALUES ('95', '0', '提成管理', 'admin/data', 'fa-cny', '1', '1000', '不记录');
INSERT INTO `agency_admin_menu` VALUES ('96', '95', '提成统计', 'admin/revenue/index', 'fa-bar-chart-o', '1', '1000', '不记录');
INSERT INTO `agency_admin_menu` VALUES ('99', '70', '结算账户', 'admin/agency/bank_info', 'fa-list', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('100', '95', '结算提成', 'admin/check_out/index', 'fa-circle-o', '1', '1000', '不记录');
INSERT INTO `agency_admin_menu` VALUES ('101', '100', '添加结算', 'admin/check_out/param_add', 'fa-plus', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('102', '100', '删除结算提成', 'admin/check_out/del', 'fa-trash', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('103', '100', '启用结算提成', 'admin/check_out/enable', 'fa-circle', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('104', '100', '禁用结算提成', 'admin/check_out/disable', 'fa-circle', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('105', '0', '打金管理', 'admin/currency_withdraw', 'fa-list', '1', '1000', '不记录');
INSERT INTO `agency_admin_menu` VALUES ('106', '105', '游戏提现', 'admin/currency_withdraw/index', 'fa-circle-o', '1', '1000', 'GET');
INSERT INTO `agency_admin_menu` VALUES ('109', '106', '完成打款', 'admin/currency_withdraw/enable', 'fa-circle', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('111', '106', '拒绝提现', 'admin/currency_withdraw/disable', 'fa-list', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('112', '80', '碎片商城', 'admin/debris/index', 'fa-circle-o', '1', '1000', 'GET');
INSERT INTO `agency_admin_menu` VALUES ('113', '112', '添加', 'admin/debris/add', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('114', '112', '修改', 'admin/debris/edit', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('115', '112', '删除', 'admin/debris/del', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('116', '80', '多宝推荐', 'admin/recommend/index', 'fa-circle-o', '1', '1000', 'GET');
INSERT INTO `agency_admin_menu` VALUES ('117', '116', '添加', 'admin/recommend/add', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('118', '116', '修改', 'admin/recommend/edit', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('119', '116', '删除', 'admin/recommend/del', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('120', '80', '积分商城', 'admin/integral/index', 'fa-circle-o', '1', '1000', 'GET');
INSERT INTO `agency_admin_menu` VALUES ('121', '120', '添加', 'admin/integral/add', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('122', '120', '修改', 'admin/integral/edit', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('123', '120', '删除', 'admin/integral/del', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('124', '80', '风雨同舟', 'admin/dali/index', 'fa-circle-o', '1', '1000', 'GET');
INSERT INTO `agency_admin_menu` VALUES ('125', '124', '添加', 'admin/dali/add', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('126', '124', '修改', 'admin/dali/edit', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('127', '124', '删除', 'admin/dali/del', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('128', '80', '每日签到', 'admin/sign_in/index', 'fa-circle-o', '1', '1000', 'GET');
INSERT INTO `agency_admin_menu` VALUES ('129', '128', '添加', 'admin/sign_in/add', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('130', '128', '修改', 'admin/sign_in/edit', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('131', '128', '删除', 'admin/sign_in/del', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('132', '80', '高级藏宝', 'admin/lottery/index', 'fa-circle-o', '1', '1000', 'GET');
INSERT INTO `agency_admin_menu` VALUES ('133', '132', '添加', 'admin/lottery/add', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('134', '132', '修改', 'admin/lottery/edit', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('135', '132', '删除', 'admin/lottery/del', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('136', '80', '诛仙宝图', 'admin/super/index', 'fa-circle-o', '1', '1000', 'GET');
INSERT INTO `agency_admin_menu` VALUES ('137', '136', '添加', 'admin/super/add', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('138', '136', '修改', 'admin/super/edit', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('139', '136', '删除', 'admin/super/del', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('140', '80', '限购商店', 'admin/day_limit/index', 'fa-circle-o', '1', '1000', 'GET');
INSERT INTO `agency_admin_menu` VALUES ('141', '140', '添加', 'admin/day_limit/add', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('142', '140', '修改', 'admin/day_limit/edit', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('143', '140', '删除', 'admin/day_limit/del', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('144', '80', '新鲜玩意', 'admin/fresh/index', 'fa-circle-o', '1', '1000', 'GET');
INSERT INTO `agency_admin_menu` VALUES ('145', '144', '添加', 'admin/fresh/add', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('146', '144', '修改', 'admin/fresh/edit', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('147', '144', '删除', 'admin/fresh/del', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('148', '80', '强化商店', 'admin/mall/index', 'fa-circle-o', '1', '1000', 'GET');
INSERT INTO `agency_admin_menu` VALUES ('149', '148', '添加', 'admin/mall/add', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('150', '148', '修改', 'admin/mall/edit', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('151', '148', '删除', 'admin/mall/del', 'fa-circle-o', '0', '1000', 'POST');
INSERT INTO `agency_admin_menu` VALUES ('160', '0', '大区管理', 'admin/sys', ' fa-th-large', '1', '1000', '不记录');
INSERT INTO `agency_admin_menu` VALUES ('161', '160', '合区工具', 'admin/merge_server/index', 'fa-circle-o', '1', '1000', '不记录');

-- ----------------------------
-- Table structure for agency_admin_role
-- ----------------------------
DROP TABLE IF EXISTS `agency_admin_role`;
CREATE TABLE `agency_admin_role` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '名称',
  `description` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '简介',
  `url` varchar(1000) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '权限',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否启用',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='后台角色';

-- ----------------------------
-- Records of agency_admin_role
-- ----------------------------
INSERT INTO `agency_admin_role` VALUES ('1', '管理员', '后台管理员角色', '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48', '1');
INSERT INTO `agency_admin_role` VALUES ('2', '代理', '代理用户，不可删除修改', '1,2,18,19,20,61,70,71,72,87,89,92,95,96,99,100,101,102,103,104', '1');

-- ----------------------------
-- Table structure for agency_admin_user
-- ----------------------------
DROP TABLE IF EXISTS `agency_admin_user`;
CREATE TABLE `agency_admin_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '用户名',
  `invite` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '邀请码',
  `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'JDJ5JDEwJGcxL0tjYWpqbmZKWWVwZjZqSXFramUyaFhxYUFOZC5hQTRiSkcvbHNSRkdndFZuaWhVeVlh' COMMENT '密码',
  `nickname` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '昵称',
  `role` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '角色',
  `level` int(1) NOT NULL DEFAULT '0' COMMENT '代理类型',
  `parent_id` int(1) NOT NULL DEFAULT '0' COMMENT '父级id',
  `grandpa_id` int(1) NOT NULL DEFAULT '0' COMMENT '祖级id',
  `tax` int(10) NOT NULL DEFAULT '0' COMMENT '提成比例',
  `money` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '未结余额',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否启用',
  `create_time` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  `delete_time` int(10) NOT NULL DEFAULT '0' COMMENT '删除时间',
  PRIMARY KEY (`id`),
  KEY `index_username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='后台用户';

-- ----------------------------
-- Records of agency_admin_user
-- ----------------------------
INSERT INTO `agency_admin_user` VALUES ('1', 'admins', '', 'JDJ5JDEwJGFkb2JOa2VoUzVxbzR4blNwTlZva2VENkFNdjZpL3pLY2lKdWd2end4U3B3b3dxS0hkUmlh', '超级管理员', '1', '0', '0', '0', '0', '0', '1', '0', '0', '0');

-- ----------------------------
-- Table structure for agency_bank_account
-- ----------------------------
DROP TABLE IF EXISTS `agency_bank_account`;
CREATE TABLE `agency_bank_account` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `agency_id` int(1) NOT NULL DEFAULT '0' COMMENT '代理id',
  `name` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '真实姓名',
  `type` int(2) NOT NULL DEFAULT '0' COMMENT '账户类型',
  `account` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '收款账户',
  `remark` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
  `create_time` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='结算账户';

-- ----------------------------
-- Records of agency_bank_account
-- ----------------------------

-- ----------------------------
-- Table structure for agency_cdk_code
-- ----------------------------
DROP TABLE IF EXISTS `agency_cdk_code`;
CREATE TABLE `agency_cdk_code` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cdk_code` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '兑换码',
  `type` int(1) NOT NULL DEFAULT '0' COMMENT '兑换类型',
  `money` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '价值',
  `item_id` int(8) NOT NULL DEFAULT '0' COMMENT '物品id',
  `item_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '物品描述',
  `mail` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '邮件物品',
  `num` int(5) NOT NULL DEFAULT '0' COMMENT '数量',
  `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态',
  `create_time` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='兑换码';

-- ----------------------------
-- Records of agency_cdk_code
-- ----------------------------

-- ----------------------------
-- Table structure for agency_cdk_record
-- ----------------------------
DROP TABLE IF EXISTS `agency_cdk_record`;
CREATE TABLE `agency_cdk_record` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cdk_code` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '兑换码',
  `account` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '玩家账号',
  `role_id` int(8) NOT NULL DEFAULT '0' COMMENT '角色id',
  `money` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '价值',
  `agency_account` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '代理账号',
  `item_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '物品描述',
  `type` int(1) NOT NULL DEFAULT '0' COMMENT '兑换类型',
  `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态',
  `create_time` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='兑换记录';

-- ----------------------------
-- Records of agency_cdk_record
-- ----------------------------

-- ----------------------------
-- Table structure for agency_check_out
-- ----------------------------
DROP TABLE IF EXISTS `agency_check_out`;
CREATE TABLE `agency_check_out` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `agency` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '代理账号',
  `money` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '结算金额',
  `tax` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '手续费',
  `amount` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '实际金额',
  `type` int(1) NOT NULL DEFAULT '0' COMMENT '兑换类型',
  `name` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '代理昵称',
  `bank_account` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '结算账户',
  `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态',
  `create_time` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='结算记录';

-- ----------------------------
-- Records of agency_check_out
-- ----------------------------

-- ----------------------------
-- Table structure for agency_level
-- ----------------------------
DROP TABLE IF EXISTS `agency_level`;
CREATE TABLE `agency_level` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '名称',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否启用',
  `create_time` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  `delete_time` int(10) NOT NULL DEFAULT '0' COMMENT '删除时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理等级';

-- ----------------------------
-- Records of agency_level
-- ----------------------------
INSERT INTO `agency_level` VALUES ('1', '一级代理', '1', '1642766827', '1642766827', '0');
INSERT INTO `agency_level` VALUES ('2', '二级代理', '1', '1642766827', '1642766827', '0');
INSERT INTO `agency_level` VALUES ('3', '三级代理', '1', '1642766827', '1642766827', '0');

-- ----------------------------
-- Table structure for agency_migrations
-- ----------------------------
DROP TABLE IF EXISTS `agency_migrations`;
CREATE TABLE `agency_migrations` (
  `version` bigint(20) NOT NULL,
  `migration_name` varchar(100) DEFAULT NULL,
  `start_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `end_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `breakpoint` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of agency_migrations
-- ----------------------------
INSERT INTO `agency_migrations` VALUES ('20190302092540', 'AdminMenu', '2022-01-21 20:07:06', '2022-01-21 20:07:06', '0');
INSERT INTO `agency_migrations` VALUES ('20190302094849', 'AdminUser', '2022-01-21 20:07:06', '2022-01-21 20:07:06', '0');
INSERT INTO `agency_migrations` VALUES ('20190302094853', 'AdminLog', '2022-01-21 20:07:06', '2022-01-21 20:07:06', '0');
INSERT INTO `agency_migrations` VALUES ('20190302094933', 'AdminRole', '2022-01-21 20:07:06', '2022-01-21 20:07:07', '0');
INSERT INTO `agency_migrations` VALUES ('20190312021143', 'AdminLogData', '2022-01-21 20:07:07', '2022-01-21 20:07:07', '0');
INSERT INTO `agency_migrations` VALUES ('20191001081329', 'Setting', '2022-01-21 20:07:07', '2022-01-21 20:07:07', '0');
INSERT INTO `agency_migrations` VALUES ('20191001081340', 'SettingGroup', '2022-01-21 20:07:07', '2022-01-21 20:07:07', '0');
INSERT INTO `agency_migrations` VALUES ('20211223163420', 'Level', '2022-01-21 20:07:07', '2022-01-21 20:07:07', '0');
INSERT INTO `agency_migrations` VALUES ('20220113102543', 'BankAccount', '2022-01-21 20:07:07', '2022-01-21 20:07:07', '0');
INSERT INTO `agency_migrations` VALUES ('20220113103700', 'CdkCode', '2022-01-21 20:07:07', '2022-01-21 20:07:08', '0');
INSERT INTO `agency_migrations` VALUES ('20220113104428', 'CdkRecord', '2022-01-21 20:07:08', '2022-01-21 20:07:08', '0');
INSERT INTO `agency_migrations` VALUES ('20220113105029', 'CheckOut', '2022-01-21 20:07:08', '2022-01-21 20:07:08', '0');
INSERT INTO `agency_migrations` VALUES ('20220113105736', 'Revenue', '2022-01-21 20:07:08', '2022-01-21 20:07:08', '0');

-- ----------------------------
-- Table structure for agency_revenue
-- ----------------------------
DROP TABLE IF EXISTS `agency_revenue`;
CREATE TABLE `agency_revenue` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `agency` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '代理账号',
  `role_id` int(8) NOT NULL DEFAULT '0' COMMENT '角色id',
  `money` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '提成金额',
  `amount` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '成交金额',
  `cdk_code` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '兑换码',
  `account` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '玩家账号',
  `create_time` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='提成记录';

-- ----------------------------
-- Records of agency_revenue
-- ----------------------------

-- ----------------------------
-- Table structure for agency_setting
-- ----------------------------
DROP TABLE IF EXISTS `agency_setting`;
CREATE TABLE `agency_setting` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `setting_group_id` int(10) NOT NULL DEFAULT '0' COMMENT '所属分组',
  `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '名称',
  `description` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '描述',
  `code` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '代码',
  `content` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '设置配置及内容',
  `sort_number` int(10) NOT NULL DEFAULT '1000' COMMENT '排序',
  `create_time` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  `delete_time` int(10) NOT NULL DEFAULT '0' COMMENT '删除时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='设置';

-- ----------------------------
-- Records of agency_setting
-- ----------------------------
INSERT INTO `agency_setting` VALUES ('1', '1', '基本设置', '后台的基本信息设置', 'base', '[{\"name\":\"u540eu53f0u540du79f0\",\"field\":\"name\",\"type\":\"text\",\"content\":\"u897fu6e38u4ee3u7406u7cfbu7edf\",\"option\":\"\"},{\"name\":\"u540eu53f0u7b80u79f0\",\"field\":\"short_name\",\"type\":\"text\",\"content\":\"u897fu6e38\",\"option\":\"\"},{\"name\":\"u540eu53f0u4f5cu8005\",\"field\":\"author\",\"type\":\"text\",\"content\":\"u4feeu7f18\",\"option\":\"\"},{\"name\":\"u540eu53f0u7248u672c\",\"field\":\"version\",\"type\":\"text\",\"content\":\"0.1\",\"option\":\"\"}]', '1000', '1640278457', '1641222694', '0');
INSERT INTO `agency_setting` VALUES ('2', '1', '登录设置', '后台登录相关设置', 'login', '[{\"name\":\"u767bu5f55tokenu9a8cu8bc1\",\"field\":\"token\",\"type\":\"switch\",\"content\":\"0\",\"option\":\"\"},{\"name\":\"u9a8cu8bc1u7801\",\"field\":\"captcha\",\"type\":\"select\",\"content\":\"1\",\"option\":\"0||u4e0du5f00u542f\r\n1||u56feu5f62u9a8cu8bc1u7801\r\n2||u6ed1u52a8u9a8cu8bc1\"},{\"name\":\"u767bu5f55u80ccu666f\",\"field\":\"background\",\"type\":\"image\",\"content\":\"/static/admin/images/login-default-bg.jpg\",\"option\":\"\"}]', '1000', '1640278457', '1640279329', '0');
INSERT INTO `agency_setting` VALUES ('3', '1', '首页设置', '后台首页参数设置', 'index', '[{\"name\":\"u9ed8u8ba4u5bc6u7801u8b66u544a\",\"field\":\"password_warning\",\"type\":\"switch\",\"content\":\"1\",\"option\":\"\"},{\"name\":\"u662fu5426u663eu793au63d0u793au4fe1u606f\",\"field\":\"show_notice\",\"type\":\"switch\",\"content\":\"1\",\"option\":\"\"},{\"name\":\"u63d0u793au4fe1u606fu5185u5bb9\",\"field\":\"notice_content\",\"type\":\"text\",\"content\":\"u6b22u8fceu6765u5230u4f7fu7528u672cu7cfbu7edf，u5de6u4fa7u4e3au83dcu5355u533au57df，u53f3u4fa7u4e3au529fu80fdu533a。\",\"option\":\"\"}]', '1000', '1640278457', '1640278457', '0');

-- ----------------------------
-- Table structure for agency_setting_group
-- ----------------------------
DROP TABLE IF EXISTS `agency_setting_group`;
CREATE TABLE `agency_setting_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `module` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '作用模块',
  `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '名称',
  `description` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '描述',
  `code` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '代码',
  `sort_number` int(10) NOT NULL DEFAULT '1000' COMMENT '排序',
  `auto_create_menu` tinyint(1) NOT NULL DEFAULT '0' COMMENT '自动生成菜单',
  `auto_create_file` tinyint(1) NOT NULL DEFAULT '0' COMMENT '自动生成配置文件',
  `icon` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'fa-list' COMMENT '图标',
  `create_time` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  `delete_time` int(10) NOT NULL DEFAULT '0' COMMENT '删除时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='设置分组';

-- ----------------------------
-- Records of agency_setting_group
-- ----------------------------
INSERT INTO `agency_setting_group` VALUES ('1', 'admin', '后台设置', '后台管理方面的设置', 'admin', '1000', '1', '1', 'fa-adjust', '1642766827', '1642766827', '0');
