/*
 Navicat Premium Data Transfer

 Source Server         : dev
 Source Server Type    : MySQL
 Source Server Version : 80040
 Source Host           : localhost:3306
 Source Schema         : ff-admin

 Target Server Type    : MySQL
 Target Server Version : 80040
 File Encoding         : 65001

 Date: 22/10/2024 14:03:00
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for ff_agent_level
-- ----------------------------
DROP TABLE IF EXISTS `ff_agent_level`;
CREATE TABLE `ff_agent_level`  (
  `id` bigint NOT NULL COMMENT '主键id',
  `level_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '代理等级名称',
  `level` tinyint NULL DEFAULT NULL COMMENT '等级',
  `total_commission` decimal(10, 0) NULL DEFAULT NULL COMMENT '晋升等级佣金标准',
  `icon_url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '图片地址',
  `default_status` tinyint NULL DEFAULT NULL COMMENT '默认状态',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '代理等级表' ROW_FORMAT = Dynamic;

ALTER TABLE `ff_agent_level` MODIFY COLUMN `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id' FIRST;


-- ----------------------------
-- Records of ff_agent_level
-- ----------------------------
INSERT INTO `ff_agent_level` VALUES (1, 'LV1', 1, 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X+S6q/sbVRZiw9jUbrNZoaAkwGVVJQyeW+1YLqtv6T6K3unUahlghEh2Xp97e3bzCGcpKLUm2JOdZTUaCxUNk4yW02BOjxy/+1hXJjoCqOnpMZXFt9iikG6iaiZ4cEBoIrSOCrp/w59t7LVIklHIFWJ2oovzqCSorX/QMfaG96Cj6Cyp2sEThUVoNVaLEJJ7+CSXgOo6pFQI99i6n6ruLZ/LUqqXdkyN/x8YPybDIFenPow9INrA1VcvG83Gp04MTrMnZoavdelpNq3mEahXGo0rlVJtfbXvd67vfc+umYlvRQLNbh168a1K+llle3puXnzZk/P9SupGgtamPevNxRjkRac1x6KBoxXAv0HIb/znYYmR9cAAAAASUVORK5CYII=', 1, '', '2024-10-24 17:24:35', '', '2024-10-24 17:29:18', '晋级需再获得0佣金的代理');
INSERT INTO `ff_agent_level` VALUES (2, 'LV2', 2, 100, '', 0, '', '2024-10-24 17:24:35', '', '2024-10-24 17:29:18', '晋级需再获得100佣金的代理');
INSERT INTO `ff_agent_level` VALUES (3, 'LV3', 3, 300, '', 0, '', '2024-10-24 17:24:35', '', '2024-10-24 17:29:18', '晋级需再获得300佣金的代理');
INSERT INTO `ff_agent_level` VALUES (4, 'LV4', 4, 500, '', 0, '', '2024-10-24 17:24:35', '', '2024-10-24 17:29:18', '晋级需再获得500佣金的代理');
INSERT INTO `ff_agent_level` VALUES (5, 'LV5', 5, 800, '', 0, '', '2024-10-24 17:24:35', '', '2024-10-24 17:29:18', '晋级需再获得800佣金的代理');
INSERT INTO `ff_agent_level` VALUES (6, 'LV6', 6, 1000, '', 0, '', '2024-10-24 17:24:35', '', '2024-10-24 17:29:18', '晋级需再获得1000佣金的代理');
INSERT INTO `ff_agent_level` VALUES (7, 'LV7', 7, 10000, '', 0, '', '2024-10-24 17:24:35', '', '2024-10-24 17:29:18', '晋级需再获得10000佣金的代理');
INSERT INTO `ff_agent_level` VALUES (8, 'LV8', 8, 30000, '', 0, '', '2024-10-24 17:24:35', '', '2024-10-24 17:29:18', '晋级需再获得30000佣金的代理');
INSERT INTO `ff_agent_level` VALUES (9, 'LV9', 9, 50000, '', 0, '', '2024-10-24 17:24:35', '', '2024-10-24 17:29:18', '晋级需再获得50000佣金的代理');
INSERT INTO `ff_agent_level` VALUES (10, 'LV10', 10, 80000, '', 0, '', '2024-10-24 17:24:35', '', '2024-10-24 17:29:18', '晋级需再获得80000佣金的代理');
INSERT INTO `ff_agent_level` VALUES (11, 'LV11', 11, 100000, '', 0, '', '2024-10-24 17:24:35', '', '2024-10-24 17:29:18', '晋级需再获得100000佣金的代理');
INSERT INTO `ff_agent_level` VALUES (12, 'LV12', 12, 1000000, '', 0, '', '2024-10-24 17:24:35', '', '2024-10-24 17:29:18', '晋级需再获得1000000佣金的代理');
INSERT INTO `ff_agent_level` VALUES (13, 'LV13', 13, 3000000, '', 0, '', '2024-10-24 17:24:35', '', '2024-10-24 17:29:18', '晋级需再获得3000000佣金的代理');
INSERT INTO `ff_agent_level` VALUES (14, 'LV14', 14, 5000000, '', 0, '', '2024-10-24 17:24:35', '', '2024-10-24 17:29:18', '晋级需再获得5000000佣金的代理');
INSERT INTO `ff_agent_level` VALUES (15, 'LV15', 15, 8000000, '', 0, '', '2024-10-24 17:24:35', '', '2024-10-24 17:29:18', '晋级需再获得8000000佣金的代理');
INSERT INTO `ff_agent_level` VALUES (16, 'LV16', 16, 10000000, '', 0, '', '2024-10-24 17:24:35', '', '2024-10-24 17:29:18', '晋级需再获得10000000佣金的代理');
INSERT INTO `ff_agent_level` VALUES (17, 'LV17', 17, 100000000, '', 0, '', '2024-10-24 17:24:35', '', '2024-10-24 17:29:18', '晋级需再获得100000000佣金的代理');
INSERT INTO `ff_agent_level` VALUES (18, 'LV18', 18, 300000000, '', 0, '', '2024-10-24 17:24:35', '', '2024-10-24 17:29:18', '晋级需再获得300000000佣金的代理');
INSERT INTO `ff_agent_level` VALUES (19, 'LV19', 19, 500000000, '', 0, '', '2024-10-24 17:24:35', '', '2024-10-24 17:29:18', '晋级需再获得500000000佣金的代理');
INSERT INTO `ff_agent_level` VALUES (20, 'LV20', 20, 800000000, '', 0, '', '2024-10-24 17:24:35', '', '2024-10-24 17:29:18', '晋级需再获得800000000佣金的代理');

SET FOREIGN_KEY_CHECKS = 1;

DROP TABLE IF EXISTS `ff_agent_mode`;
CREATE TABLE `ff_agent_mode`  (
  `id` bigint NOT NULL COMMENT '主键id',
  `mode_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '代理模式名称',
  `pattern_source` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '模式来源',
  `settle_duration` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '结算周期',
  `calc_performance` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '佣金计算依据',
  `apply_mode` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '申请方式',
  `calc_level_type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '代理佣金计算层级',
  `calc_mode` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '计算方式',
  `calc_range` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '业绩计算范围',
  `calc_ext_type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '越级额外佣金类型',
  `calc_ext_rate` decimal(10, 2) NULL DEFAULT NULL COMMENT '赠送比例',
  `tutorial_type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '推广教程配置类型',
  `tutorial_contents` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '推广教程配置自定义模式下内容',
  `default_status` tinyint NULL DEFAULT 0 COMMENT '是否默认(0非默认,1默认)',
  `enable_status` tinyint NULL DEFAULT 0 COMMENT '启用(0未启用,1启用)',
  `last_settle_day` datetime NULL DEFAULT NULL COMMENT '上周期结算时间',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '代理模式表' ROW_FORMAT = DYNAMIC;

ALTER TABLE `ff_agent_mode` MODIFY COLUMN `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id' FIRST;

INSERT INTO `ff_agent_mode` VALUES (1, '一级净盈利', '1', '3', '2', '0', '1', '0', '1', '0', 0.00, '0', NULL, 0, 0, NULL, '', '2024-10-23 10:24:35', '', '2024-10-23 15:54:19', NULL);
INSERT INTO `ff_agent_mode` VALUES (2, '三级净盈利', '1', '3', '2', '0', '3', '0', '1', '2', 0.00, '0', NULL, 1, 0, NULL, '', '2024-10-23 10:24:35', '', '2024-10-23 11:36:01', NULL);
INSERT INTO `ff_agent_mode` VALUES (3, '全民代理', '1', '1', '2', '0', '999', '0', '1', '2', 30.00, '0', NULL, 0, 0, NULL, '', '2024-10-23 10:24:35', '', '2024-10-23 11:36:01', NULL);
INSERT INTO `ff_agent_mode` VALUES (4, '无限极差', '1', '1', '2', '0', '999', '0', '1', '4', 0.00, '0', NULL, 0, 0, NULL, '', '2024-10-23 10:24:35', '', '2024-10-23 11:36:01', NULL);
INSERT INTO `ff_agent_mode` VALUES (5, '一级代理', '1', '1', '2', '0', '1', '0', '1', '0', 0.00, '0', NULL, 0, 0, NULL, '', '2024-10-23 10:24:35', '', '2024-10-23 11:36:01', NULL);

-- 菜单 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('代理模式', '3051', '1', 'agentMode', 'agent/agentMode/index', 1, 0, 'C', '0', '0', 'agent:agentMode:list', '#', 'admin', sysdate(), '', null, '代理模式菜单');

INSERT INTO `sys_dict_type` (`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10000, '模式来源', 'ff_pattern_source', '0', 'admin', '2024-10-22 06:26:19', 'admin', '2024-10-22 06:26:40', '模式来源');

INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10000, 1, '系统自带', '1', 'ff_pattern_source', NULL, 'default', 'N', '0', 'admin', '2024-10-22 06:32:33', 'admin', '2024-10-22 06:32:41', '');
INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10001, 2, '自定义', '2', 'ff_pattern_source', NULL, 'default', 'N', '0', 'admin', '2024-10-22 06:33:05', '', NULL, NULL);


INSERT INTO `sys_dict_type` (`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10001, '代理佣金计算层级', 'ff_calc_level_type', '0', 'admin', '2024-10-22 06:42:11', '', NULL, '代理佣金计算层级');

INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10002, 1, '只算一级', '1', 'ff_calc_level_type', NULL, 'default', 'N', '0', 'admin', '2024-10-22 06:43:00', '', NULL, NULL);
INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10003, 2, '最多三级', '3', 'ff_calc_level_type', NULL, 'default', 'N', '0', 'admin', '2024-10-22 06:43:14', '', NULL, NULL);
INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10004, 3, '无数级', '999', 'ff_calc_level_type', NULL, 'default', 'N', '0', 'admin', '2024-10-22 06:43:40', '', NULL, NULL);


INSERT INTO `sys_dict_type` (`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10002, '申请方式', 'ff_apply_mode', '0', 'admin', '2024-10-22 06:54:08', 'admin', '2024-10-22 06:54:13', '申请方式');

INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10005, 0, '直接生效', '0', 'ff_apply_mode', NULL, 'default', 'N', '0', 'admin', '2024-10-22 06:54:46', '', NULL, NULL);


INSERT INTO `sys_dict_type` (`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10003, '结算周期', 'ff_settle_duration', '0', 'admin', '2024-10-22 06:59:57', '', NULL, '结算周期');

INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10006, 0, '日结', '1', 'ff_settle_duration', NULL, 'default', 'N', '0', 'admin', '2024-10-22 07:02:37', '', NULL, NULL);
INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10007, 1, '周结', '2', 'ff_settle_duration', NULL, 'default', 'N', '0', 'admin', '2024-10-22 07:02:53', '', NULL, NULL);
INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10008, 2, '月结', '3', 'ff_settle_duration', NULL, 'default', 'N', '0', 'admin', '2024-10-22 07:03:08', '', NULL, NULL);


INSERT INTO `sys_dict_type` (`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10004, '佣金计算依据', 'ff_calc_performance', '0', 'admin', '2024-10-22 07:25:17', '', NULL, NULL);

INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10009, 0, '有效投注', '0', 'ff_calc_performance', NULL, 'default', 'N', '0', 'admin', '2024-10-22 07:26:14', '', NULL, NULL);
INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10010, 1, '亏损金额', '1', 'ff_calc_performance', NULL, 'default', 'N', '0', 'admin', '2024-10-22 07:26:37', '', NULL, NULL);
INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10011, 2, '净盈利', '2', 'ff_calc_performance', NULL, 'default', 'N', '0', 'admin', '2024-10-22 07:27:09', '', NULL, NULL);


INSERT INTO `sys_dict_type` (`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10005, '计算方式', 'ff_calc_mode', '0', 'admin', '2024-10-22 08:23:21', '', NULL, '计算方式');

INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10012, 0, '所有会员(综合盈利会员)', '0', 'ff_calc_mode', NULL, 'default', 'N', '0', 'admin', '2024-10-22 08:24:18', '', NULL, NULL);
INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10013, 1, '仅计算亏损会员', '1', 'ff_calc_mode', NULL, 'default', 'N', '0', 'admin', '2024-10-22 08:24:37', '', NULL, NULL);


INSERT INTO `sys_dict_type` (`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10006, '业绩计算范围', 'ff_calc_range', '0', 'admin', '2024-10-22 08:26:04', '', NULL, '业绩计算范围');

INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10014, 0, '计算全部(含无效)', '0', 'ff_calc_range', NULL, 'default', 'N', '0', 'admin', '2024-10-22 08:51:44', '', NULL, NULL);
INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10015, 1, '只计算有效会员业绩', '1', 'ff_calc_range', NULL, 'default', 'N', '0', 'admin', '2024-10-22 08:52:27', '', NULL, NULL);

INSERT INTO `sys_dict_type` (`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10007, '推广教程配置', 'ff_tutorial_type', '0', 'admin', '2024-10-22 08:56:58', '', NULL, '推广教程配置');

INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10016, 0, '系统自带', '0', 'ff_tutorial_type', NULL, 'default', 'N', '0', 'admin', '2024-10-22 08:57:35', '', NULL, NULL);
INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10017, 1, '自定义', '1', 'ff_tutorial_type', NULL, 'default', 'N', '0', 'admin', '2024-10-22 08:58:16', '', NULL, NULL);


INSERT INTO `sys_dict_type` (`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10008, '越级额外佣金类型', 'ff_calc_ext_type', '0', 'admin', '2024-10-23 05:13:35', '', NULL, '越级额外佣金类型');

INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10018, 0, '-', '0', 'ff_calc_ext_type', NULL, 'default', 'N', '0', 'admin', '2024-10-23 05:14:46', '', NULL, NULL);
INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10019, 1, '比例中的比例(跨级部分会员承担)', '1', 'ff_calc_ext_type', NULL, 'default', 'N', '0', 'admin', '2024-10-23 05:15:40', 'admin', '2024-10-23 05:16:20', NULL);
INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10020, 2, '比例中的比例(跨级部分站长承担)', '2', 'ff_calc_ext_type', NULL, 'default', 'N', '0', 'admin', '2024-10-23 05:16:16', '', NULL, NULL);
INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10021, 3, '站长额外固定赠送', '3', 'ff_calc_ext_type', NULL, 'default', 'N', '0', 'admin', '2024-10-23 05:16:44', '', NULL, NULL);
INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10022, 4, '比例中的比例(跨级部分站长承担)', '4', 'ff_calc_ext_type', NULL, 'default', 'N', '0', 'admin', '2024-10-23 05:18:59', '', NULL, NULL);

DROP TABLE IF EXISTS `ff_settlement_setting`;
CREATE TABLE `ff_settlement_setting`  (
  `id` bigint NOT NULL COMMENT '主键id',
  `commission_type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '佣金领取时间类型',
  `receive_way` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '领取方式',
  `commission_start_time` time NULL DEFAULT NULL COMMENT '佣金领取开始时间',
  `commission_end_time` time NULL DEFAULT NULL COMMENT '佣金领取结束时间',
  `agent_audit_rate` decimal(10, 2) NULL DEFAULT NULL COMMENT '佣金稽核倍数',
  `min_valid_bet` decimal(10, 2) NULL DEFAULT NULL COMMENT '有效投注金额',
  `min_valid_recharge` decimal(10, 2) NULL DEFAULT NULL COMMENT '结算周期内充值金额',
  `day_commission_limit` decimal(10, 2) NULL DEFAULT NULL COMMENT '日结模式上限',
  `week_commission_limit` decimal(10, 2) NULL DEFAULT NULL COMMENT '周结模式上限',
  `month_commission_limit` decimal(10, 2) NULL DEFAULT NULL COMMENT '月结模式上限',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '结算设置表' ROW_FORMAT = DYNAMIC;

ALTER TABLE `ff_settlement_setting` MODIFY COLUMN `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id' FIRST;

-- ----------------------------
-- Records of ff_settlement_setting
-- ----------------------------
INSERT INTO `ff_settlement_setting` VALUES (1, '1', '08:00:00', '23:59:59', 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, '', '2024-10-24 09:14:00', '', '2024-10-24 10:00:00', NULL);

INSERT INTO `sys_dict_type` (`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10009, '佣金领取时间类型', 'ff_commission_type', '0', 'admin', '2024-10-23 09:36:14', '', NULL, '佣金领取时间类型');
INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10023, 0, '每天', '1', 'ff_commission_type', NULL, 'default', 'N', '0', 'admin', '2024-10-23 09:36:31', '', NULL, NULL);

DROP TABLE IF EXISTS `ff_agent_info`;
CREATE TABLE `ff_agent_info`  (
  `id` bigint NOT NULL COMMENT '主键id',
  `agent_id` bigint NOT NULL COMMENT '代理id',
  `root_id` bigint NULL COMMENT '顶级代理id',
  `level` int COMMENT '所属层级',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '代理信息表' ROW_FORMAT = Dynamic;

ALTER TABLE `ff_agent_info` MODIFY COLUMN `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id' FIRST;

DROP TABLE IF EXISTS `ff_agent_relation`;
CREATE TABLE `ff_agent_relation`  (
  `id` bigint NOT NULL COMMENT '主键id',
  `root_id` bigint NULL COMMENT '顶级代理id',
  `node_relation` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '节点关系',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '代理关系表' ROW_FORMAT = Dynamic;

ALTER TABLE `ff_agent_relation` MODIFY COLUMN `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id' FIRST;

-- 按钮 SQL
INSERT INTO `ff-admin`.`sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `route_name`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10007, '代理模式查询', 10006, 1, '#', '', NULL, '', 1, 0, 'F', '0', '0', 'agent:agentMode:query', '#', 'admin', '2024-10-24 01:09:11', '', NULL, '');
INSERT INTO `ff-admin`.`sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `route_name`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10008, '代理模式新增', 10006, 2, '#', '', NULL, '', 1, 0, 'F', '0', '0', 'agent:agentMode:add', '#', 'admin', '2024-10-24 01:09:11', '', NULL, '');
INSERT INTO `ff-admin`.`sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `route_name`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10009, '代理模式修改', 10006, 3, '#', '', NULL, '', 1, 0, 'F', '0', '0', 'agent:agentMode:edit', '#', 'admin', '2024-10-24 01:09:11', '', NULL, '');
INSERT INTO `ff-admin`.`sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `route_name`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10010, '代理模式删除', 10006, 4, '#', '', NULL, '', 1, 0, 'F', '0', '0', 'agent:agentMode:remove', '#', 'admin', '2024-10-24 01:09:11', '', NULL, '');
INSERT INTO `ff-admin`.`sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `route_name`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10011, '代理模式导出', 10006, 5, '#', '', NULL, '', 1, 0, 'F', '0', '0', 'agent:agentMode:export', '#', 'admin', '2024-10-24 01:09:11', '', NULL, '');


DROP TABLE IF EXISTS `ff_commission_info`;
CREATE TABLE `ff_commission_info`  (
                                       `id` bigint NOT NULL COMMENT '主键id',
                                       `member_id` bigint NOT NULL COMMENT '会员id',
                                       `currency_type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '币种',
                                       `total_amount` decimal(10, 2) DEFAULT NULL COMMENT '累计佣金',
                                       `total_withdrawn` decimal(10, 2) DEFAULT NULL COMMENT '累计提现',
                                       `total_no_withdrawn` decimal(10, 2) DEFAULT NULL COMMENT '累计未提现',
                                       `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
                                       `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
                                       `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
                                       `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
                                       `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
                                       PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '佣金信息表' ROW_FORMAT = Dynamic;

ALTER TABLE `ff_commission_info` MODIFY COLUMN `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id' FIRST;


DROP TABLE IF EXISTS `ff_commission_flow_detail`;
CREATE TABLE `ff_commission_flow_detail`  (
                                              `id` bigint NOT NULL COMMENT '主键id',
                                              `member_id` bigint NOT NULL COMMENT '会员id',
                                              `currency_type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '币种',
                                              `amount` decimal(10, 2) DEFAULT NULL COMMENT '佣金',
                                              `withdrawn` decimal(10, 2) DEFAULT NULL COMMENT '提现金额',
                                              `settle_status` tinyint DEFAULT 0 COMMENT '结算状态(0未提现,1已提现)',
                                              `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
                                              `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
                                              `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
                                              `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
                                              `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
                                              PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '佣金流水明细表' ROW_FORMAT = Dynamic;

ALTER TABLE `ff_commission_flow_detail` MODIFY COLUMN `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id' FIRST;

INSERT INTO `sys_dict_type` (`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10010, '领取方式', 'ff_receive_way', '0', 'admin', '2024-11-01 05:23:51', '', NULL, '领取方式');
INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10024, 0, '自动派发', '1', 'ff_receive_way', NULL, 'default', 'N', '0', 'admin', '2024-11-01 05:24:20', '', NULL, NULL);


ALTER TABLE `ff_agent_level`
    MODIFY COLUMN `total_commission` decimal(16, 2) NULL DEFAULT NULL COMMENT '晋升等级佣金标准' AFTER `level`;
ALTER TABLE `ff_settlement_setting`
    MODIFY COLUMN `min_valid_bet` decimal(16, 2) NULL DEFAULT NULL COMMENT '有效投注金额' AFTER `agent_audit_rate`;
ALTER TABLE `ff_settlement_setting`
    MODIFY COLUMN `min_valid_recharge` decimal(16, 2) NULL DEFAULT NULL COMMENT '结算周期内充值金额' AFTER `min_valid_bet`;
ALTER TABLE `ff_settlement_setting`
    MODIFY COLUMN `day_commission_limit` decimal(16, 2) NULL DEFAULT NULL COMMENT '日结模式上限' AFTER `min_valid_recharge`;
ALTER TABLE `ff_settlement_setting`
    MODIFY COLUMN `week_commission_limit` decimal(16, 2) NULL DEFAULT NULL COMMENT '周结模式上限' AFTER `day_commission_limit`;
ALTER TABLE `ff_settlement_setting`
    MODIFY COLUMN `month_commission_limit` decimal(16, 2) NULL DEFAULT NULL COMMENT '月结模式上限' AFTER `week_commission_limit`;
ALTER TABLE `ff_commission_info`
    MODIFY COLUMN `total_amount` decimal(16, 2) NULL DEFAULT NULL COMMENT '累计佣金' AFTER `currency_type`;
ALTER TABLE `ff_commission_info`
    MODIFY COLUMN `total_withdrawn` decimal(16, 2) NULL DEFAULT NULL COMMENT '累计提现' AFTER `total_amount`;
ALTER TABLE `ff_commission_info`
    MODIFY COLUMN `total_no_withdrawn` decimal(16, 2) NULL DEFAULT NULL COMMENT '累计未提现' AFTER `total_withdrawn`;
ALTER TABLE `ff_commission_flow_detail`
    MODIFY COLUMN `amount` decimal(16, 2) NULL DEFAULT NULL COMMENT '佣金' AFTER `currency_type`;
ALTER TABLE `ff_commission_flow_detail`
    MODIFY COLUMN `withdrawn` decimal(16, 2) NULL DEFAULT NULL COMMENT '提现金额' AFTER `amount`;

INSERT INTO `sys_dict_type` (`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10011, '代理提佣方式', 'ff_commission_way', '0', 'admin', '2024-11-05 06:31:53', '', NULL, '代理提佣方式');
INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10025, 0, '不限制(自由领取)', '0', 'ff_commission_way', NULL, 'default', 'N', '0', 'admin', '2024-11-05 06:32:13', '', NULL, NULL);
INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10026, 1, '禁止所有提佣(含下级，私下结算)', '1', 'ff_commission_way', NULL, 'default', 'N', '0', 'admin', '2024-11-05 06:32:23', '', NULL, NULL);
INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10027, 2, '禁止本人提佣(私下结算)', '2', 'ff_commission_way', NULL, 'default', 'N', '0', 'admin', '2024-11-05 06:32:34', '', NULL, NULL);

INSERT INTO `sys_dict_type` (`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10012, '佣金返利类型', 'ff_rebate_type', '0', 'admin', '2024-11-05 09:16:42', '', NULL, '佣金返利类型');
INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10028, 1, '有效投注', '1', 'ff_rebate_type', NULL, 'default', 'N', '0', 'admin', '2024-11-05 09:17:34', '', NULL, NULL);
INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10029, 2, '净盈利', '2', 'ff_rebate_type', NULL, 'default', 'N', '0', 'admin', '2024-11-05 09:18:02', '', NULL, NULL);


DROP TABLE IF EXISTS `ff_rebate_setting`;
CREATE TABLE `ff_rebate_setting`  (
      `id` bigint NOT NULL COMMENT '主键id',
      `game_type` bigint DEFAULT NULL COMMENT '游戏类型',
      `calc_performance` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '佣金计算依据',
      `valid_num` int DEFAULT NULL COMMENT '有效人数',
      `commission` decimal(16, 2) DEFAULT NULL COMMENT '佣金金额',
      `commission_rate` decimal(10, 2) DEFAULT NULL COMMENT '佣金比例',
      `min_amount` decimal(16, 2) DEFAULT NULL COMMENT '最小金额',
      `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
      `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
      `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
      `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
      `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
      PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '返佣设置表' ROW_FORMAT = Dynamic;

ALTER TABLE `ff_rebate_setting` MODIFY COLUMN `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id' FIRST;

delete from sys_menu where menu_name like '返佣设置%';

INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `route_name`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10018, '返佣设置', 3051, 1, 'rebateSetting', 'agent/rebateSetting/index', NULL, '', 1, 0, 'C', '0', '0', 'agent:rebateSetting:list', '#', 'admin', '2024-11-06 03:28:17', '', NULL, '返佣设置菜单');
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `route_name`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10019, '返佣设置查询', 10018, 1, '#', '', NULL, '', 1, 0, 'F', '0', '0', 'agent:rebateSetting:query', '#', 'admin', '2024-11-06 03:28:17', '', NULL, '');
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `route_name`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10020, '返佣设置新增', 10018, 2, '#', '', NULL, '', 1, 0, 'F', '0', '0', 'agent:rebateSetting:add', '#', 'admin', '2024-11-06 03:28:17', '', NULL, '');
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `route_name`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10021, '返佣设置修改', 10018, 3, '#', '', NULL, '', 1, 0, 'F', '0', '0', 'agent:rebateSetting:edit', '#', 'admin', '2024-11-06 03:28:17', '', NULL, '');
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `route_name`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10022, '返佣设置删除', 10018, 4, '#', '', NULL, '', 1, 0, 'F', '0', '0', 'agent:rebateSetting:remove', '#', 'admin', '2024-11-06 03:28:17', '', NULL, '');
INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `route_name`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10023, '返佣设置导出', 10018, 5, '#', '', NULL, '', 1, 0, 'F', '0', '0', 'agent:rebateSetting:export', '#', 'admin', '2024-11-06 03:28:17', '', NULL, '');

ALTER TABLE ff_agent_mode ADD COLUMN agent_model_type tinyint DEFAULT NULL COMMENT '代理模式类型' AFTER `pattern_source`;

ALTER TABLE ff_agent_info ADD COLUMN depth int COMMENT '深度(下级层数)' AFTER `level`;
ALTER TABLE ff_agent_info ADD COLUMN direct_num int COMMENT '直属数' AFTER `depth`;
ALTER TABLE ff_agent_info ADD COLUMN agent_num int COMMENT '代理总数' AFTER `direct_num`;
ALTER TABLE ff_agent_info ADD COLUMN member_num int COMMENT '所有下级的会员数量(下级总数)' AFTER `agent_num`;


ALTER TABLE ff_agent_level ADD COLUMN currency_type varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '币种' AFTER `level`;

DROP TABLE IF EXISTS `ff_agent_level_relation`;
CREATE TABLE `ff_agent_level_relation`  (
                                            `id` bigint NOT NULL COMMENT '主键id',
                                            `member_id` bigint NOT NULL COMMENT '会员id',
                                            `agent_level_id` bigint NOT NULL COMMENT '代理等级id',
                                            `currency_type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '币种',
                                            `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
                                            `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
                                            `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
                                            `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
                                            `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
                                            PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '代理等级关系表' ROW_FORMAT = Dynamic;

ALTER TABLE `ff_agent_level_relation` MODIFY COLUMN `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id' FIRST;