还原系统、更新配置
This commit is contained in:
0
other/libs/maven_install
Normal file → Executable file
0
other/libs/maven_install
Normal file → Executable file
268
other/sql/add.sql
Normal file
268
other/sql/add.sql
Normal file
@@ -0,0 +1,268 @@
|
||||
-- ==========================================
|
||||
-- 完整的数据库补充脚本(整合所有历史变更 + 数据类型修正)
|
||||
-- ==========================================
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ==========================================
|
||||
-- 第一部分:为已有表添加缺失字段
|
||||
-- ==========================================
|
||||
|
||||
-- 1. 为 sv_member 表添加缺失字段(对应 202604.sql)
|
||||
ALTER TABLE `sv_member`
|
||||
ADD COLUMN `avatar_modify_count` int(11) DEFAULT '0' COMMENT '头像修改次数(本年)' AFTER `deleted`,
|
||||
ADD COLUMN `avatar_modify_year` int(11) DEFAULT NULL COMMENT '头像修改统计年份' AFTER `avatar_modify_count`;
|
||||
|
||||
-- 2. 为 sv_venue 表添加缺失字段(包含 202312.sql 的字段)
|
||||
ALTER TABLE `sv_venue`
|
||||
ADD COLUMN `limit_day` int(11) DEFAULT NULL COMMENT '每天预约限制' AFTER `deleted`,
|
||||
ADD COLUMN `limit_week` int(11) DEFAULT NULL COMMENT '每周预约限制' AFTER `limit_day`,
|
||||
ADD COLUMN `limit_no_day` int(11) DEFAULT NULL COMMENT '每天预约限制' AFTER `limit_week`,
|
||||
ADD COLUMN `limit_no_week` int(11) DEFAULT NULL COMMENT '每周预约限制' AFTER `limit_no_day`,
|
||||
ADD COLUMN `copy_week` int(11) DEFAULT NULL COMMENT '复制周几' AFTER `limit_no_week`,
|
||||
ADD COLUMN `copy_time` time DEFAULT NULL COMMENT '复制时间' AFTER `copy_week`,
|
||||
ADD COLUMN `copy_target` int(11) DEFAULT NULL COMMENT '向后复制多少' AFTER `copy_time`,
|
||||
ADD COLUMN `copy_control` tinyint(4) DEFAULT '0' COMMENT '复制开关 1-关闭,不复制 0-开启,复制' AFTER `copy_target`,
|
||||
ADD COLUMN `pay_style` tinyint(4) DEFAULT '0' COMMENT '计费方式 0-按次收费、1-按时收费' AFTER `copy_control`,
|
||||
ADD COLUMN `time_pay_hour` int(11) DEFAULT NULL COMMENT '按次收费几小时内免费' AFTER `pay_style`;
|
||||
|
||||
-- 3. 为 sv_venue_lesson 表添加缺失字段
|
||||
ALTER TABLE `sv_venue_lesson`
|
||||
ADD COLUMN `order_limit` int(11) DEFAULT NULL COMMENT '可取消预约时间(小时)' AFTER `deleted`;
|
||||
|
||||
|
||||
-- ==========================================
|
||||
-- 第二部分:创建缺失的新表(数据类型已修正)
|
||||
-- ==========================================
|
||||
|
||||
-- 4. 创建 sv_disclaimers (免责声明表) - 对应 202404.sql
|
||||
DROP TABLE IF EXISTS `sv_disclaimers`;
|
||||
CREATE TABLE `sv_disclaimers` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`description` longtext CHARACTER SET utf8mb4 NOT NULL COMMENT '免责声明内容',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '修改者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` int(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='免责声明';
|
||||
|
||||
-- 5. 创建 sv_health_doc (健康文档表)
|
||||
DROP TABLE IF EXISTS `sv_health_doc`;
|
||||
CREATE TABLE `sv_health_doc` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`member_id` int(11) NOT NULL COMMENT '用户ID',
|
||||
`doc_name` varchar(100) NOT NULL COMMENT '文档名称',
|
||||
`doc_type` varchar(50) NOT NULL COMMENT '文档类型',
|
||||
`file_type` varchar(20) NOT NULL COMMENT '文件类型',
|
||||
`doc_path` varchar(200) NOT NULL COMMENT '文档路径',
|
||||
`doc_date` date NOT NULL COMMENT '文档日期',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_member_id` (`member_id`,`deleted`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='健康文档';
|
||||
|
||||
-- 6. 创建 sv_member_lesson_ticket_invite (门票邀请表) - 使用历史脚本的表名
|
||||
DROP TABLE IF EXISTS `sv_member_lesson_ticket_invite`;
|
||||
CREATE TABLE `sv_member_lesson_ticket_invite` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`owner_id` int(11) NOT NULL DEFAULT '1' COMMENT '场馆类型',
|
||||
`member_id` int(11) NOT NULL,
|
||||
`member_name` varchar(50) DEFAULT NULL COMMENT '被邀请用户姓名',
|
||||
`mobile` varchar(11) DEFAULT NULL COMMENT '手机号',
|
||||
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0-未选中 1-已选中',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '修改者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `lesson_id` (`deleted`,`status`),
|
||||
KEY `idx_owner_id` (`owner_id`,`deleted`),
|
||||
KEY `idx_member_id` (`member_id`,`deleted`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='场馆课程预订信息';
|
||||
|
||||
-- 7. 创建 sv_member_enter_status (用户入场状态表) - 对应 202312.sql
|
||||
DROP TABLE IF EXISTS `sv_member_enter_status`;
|
||||
CREATE TABLE `sv_member_enter_status` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`member_id` int(11) NOT NULL COMMENT '客户ID',
|
||||
`venue_id` int(11) NOT NULL COMMENT '场馆ID',
|
||||
`status` int(11) NOT NULL COMMENT '状态 0-场外 1-场内',
|
||||
`created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_member_venue` (`member_id`, `venue_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1231 DEFAULT CHARSET=utf8mb4 COMMENT='用户在场馆的状态';
|
||||
|
||||
-- 8. 创建 sv_barcode (二维码表) - 整合 202312.sql 的 order_sn 字段
|
||||
DROP TABLE IF EXISTS `sv_barcode`;
|
||||
CREATE TABLE `sv_barcode` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`barcode` varchar(50) NOT NULL COMMENT '二维码',
|
||||
`order_sn` varchar(200) DEFAULT NULL COMMENT '订单号',
|
||||
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0-未使用 1-已使用',
|
||||
`member_id` int(11) NOT NULL COMMENT '用户ID',
|
||||
`venue_id` int(11) NOT NULL COMMENT '场馆ID',
|
||||
`enter` tinyint(4) DEFAULT NULL COMMENT '入场标识',
|
||||
`created_id` int(10) DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) DEFAULT '0' COMMENT '修改者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_barcode` (`barcode`),
|
||||
KEY `idx_order_sn` (`order_sn`),
|
||||
KEY `idx_member_id` (`member_id`),
|
||||
KEY `idx_venue_id` (`venue_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='二维码';
|
||||
|
||||
-- 9. 创建 sv_barcode_enter_log (二维码进出记录表)
|
||||
DROP TABLE IF EXISTS `sv_barcode_enter_log`;
|
||||
CREATE TABLE `sv_barcode_enter_log` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`barcode` varchar(50) NOT NULL COMMENT '二维码',
|
||||
`venue_id` int(11) NOT NULL COMMENT '场馆ID',
|
||||
`type` tinyint(4) NOT NULL COMMENT '类型: 0-入场 1-出场',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`created_id` int(10) DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) DEFAULT '0' COMMENT '修改者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_barcode` (`barcode`),
|
||||
KEY `idx_venue_id` (`venue_id`),
|
||||
KEY `idx_created_time` (`created_time`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='二维码进出记录';
|
||||
|
||||
-- 10. 创建 sv_barcode_offline (二维码离线表)
|
||||
DROP TABLE IF EXISTS `sv_barcode_offline`;
|
||||
CREATE TABLE `sv_barcode_offline` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`barcode` varchar(50) NOT NULL COMMENT '二维码',
|
||||
`start_time` datetime NOT NULL COMMENT '开始时间',
|
||||
`end_time` datetime NOT NULL COMMENT '结束时间',
|
||||
`venue_id` int(11) NOT NULL COMMENT '场馆ID',
|
||||
`device_name` varchar(100) DEFAULT NULL COMMENT '设备名称',
|
||||
`created_id` int(10) DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) DEFAULT '0' COMMENT '修改者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_barcode` (`barcode`),
|
||||
KEY `idx_venue_id` (`venue_id`),
|
||||
KEY `idx_time` (`start_time`,`end_time`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='二维码离线记录';
|
||||
|
||||
-- 11. 创建 sv_barcode_order_time (二维码订单时间表) - ⭐ 数据类型已修正为 DECIMAL
|
||||
DROP TABLE IF EXISTS `sv_barcode_order_time`;
|
||||
CREATE TABLE `sv_barcode_order_time` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`member_id` int(11) NOT NULL COMMENT '用户ID',
|
||||
`venue_id` int(11) NOT NULL COMMENT '场馆ID',
|
||||
`order_sn` varchar(200) DEFAULT NULL COMMENT '退款订单号',
|
||||
`order_add_sn` varchar(30) DEFAULT NULL COMMENT '追加付款订单号',
|
||||
`order_start` datetime NOT NULL COMMENT '订单开始时间',
|
||||
`order_end` datetime NOT NULL COMMENT '订单结束时间',
|
||||
`status` int(11) DEFAULT NULL COMMENT '0-有效 1-失效',
|
||||
`paying` int(11) DEFAULT NULL COMMENT '支付状态: 0-不需要退款 1-待结算/需要退款 2-已补交费用',
|
||||
`pay_money` decimal(10,2) DEFAULT NULL COMMENT '当前退款金额',
|
||||
`sum_pay_money` decimal(10,2) DEFAULT NULL COMMENT '总退款金额',
|
||||
`last_enter` datetime DEFAULT NULL COMMENT '最后入场时间',
|
||||
`last_out` datetime DEFAULT NULL COMMENT '最后出场时间',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_order_sn` (`order_sn`),
|
||||
KEY `idx_member_id` (`member_id`),
|
||||
KEY `idx_venue_id` (`venue_id`),
|
||||
KEY `idx_order_time` (`order_start`,`order_end`),
|
||||
KEY `idx_status` (`status`,`paying`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='二维码订单时间';
|
||||
|
||||
-- 12. 创建 sv_wx_config (微信配置表)
|
||||
DROP TABLE IF EXISTS `sv_wx_config`;
|
||||
CREATE TABLE `sv_wx_config` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`wx_open_id` varchar(100) NOT NULL COMMENT '微信OpenID',
|
||||
`venue_id` int(11) NOT NULL COMMENT '场馆ID',
|
||||
`created_id` int(10) DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) DEFAULT '0' COMMENT '修改者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_wx_open_id` (`wx_open_id`),
|
||||
KEY `idx_venue_id` (`venue_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='微信配置';
|
||||
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
-- ==========================================
|
||||
-- 第三部分:验证脚本执行结果
|
||||
-- ==========================================
|
||||
|
||||
-- 验证字段是否添加成功
|
||||
SELECT
|
||||
TABLE_NAME,
|
||||
COLUMN_NAME,
|
||||
COLUMN_TYPE,
|
||||
COLUMN_COMMENT
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = DATABASE()
|
||||
AND TABLE_NAME IN ('sv_member', 'sv_venue', 'sv_venue_lesson')
|
||||
AND COLUMN_NAME IN (
|
||||
'avatar_modify_count', 'avatar_modify_year',
|
||||
'limit_day', 'limit_week', 'limit_no_day', 'limit_no_week',
|
||||
'copy_week', 'copy_time', 'copy_target', 'copy_control',
|
||||
'pay_style', 'time_pay_hour', 'order_limit'
|
||||
)
|
||||
ORDER BY TABLE_NAME, ORDINAL_POSITION;
|
||||
|
||||
-- 验证新表是否创建成功
|
||||
SELECT
|
||||
TABLE_NAME,
|
||||
TABLE_COMMENT,
|
||||
CREATE_TIME
|
||||
FROM information_schema.TABLES
|
||||
WHERE TABLE_SCHEMA = DATABASE()
|
||||
AND TABLE_NAME IN (
|
||||
'sv_disclaimers', 'sv_health_doc', 'sv_member_lesson_ticket_invite',
|
||||
'sv_member_enter_status', 'sv_barcode', 'sv_barcode_enter_log',
|
||||
'sv_barcode_offline', 'sv_barcode_order_time', 'sv_wx_config'
|
||||
)
|
||||
ORDER BY TABLE_NAME;
|
||||
|
||||
-- 特别验证 sv_barcode_order_time 的字段类型是否正确
|
||||
SELECT
|
||||
COLUMN_NAME,
|
||||
COLUMN_TYPE,
|
||||
COLUMN_COMMENT
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = DATABASE()
|
||||
AND TABLE_NAME = 'sv_barcode_order_time'
|
||||
AND COLUMN_NAME IN ('pay_money', 'sum_pay_money')
|
||||
ORDER BY ORDINAL_POSITION;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `sv_health_docs` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号',
|
||||
`member_id` int(11) NOT NULL COMMENT '会员编号',
|
||||
`doc_name` varchar(100) DEFAULT NULL COMMENT '文档名称',
|
||||
`doc_type` char(10) DEFAULT NULL COMMENT '文档类型',
|
||||
`file_type` varchar(20) DEFAULT NULL COMMENT '文件类型',
|
||||
`doc_path` varchar(255) DEFAULT NULL COMMENT '文档路径',
|
||||
`doc_date` date DEFAULT NULL COMMENT '文档日期',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除状态 0-未删除 1-已删除',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_member_id` (`member_id`),
|
||||
KEY `idx_platform_id` (`platform_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='健康证';
|
||||
15
other/sql/add_menu.sql
Normal file
15
other/sql/add_menu.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
-- 1. 足球场 (归属:场馆管理 parent_id=24)
|
||||
INSERT INTO smart_venue.sys_menu (id,status,name,en_name,url,icon,parent_id,sort,remark,created_id,modified_id,created_time,modified_time,deleted) VALUES
|
||||
(50,0,'足球场','Football Venue','venue/football/index','futbol-o',24,2,'足球场管理',0,0,NOW(),NOW(),0);
|
||||
|
||||
-- 2. 健康报告 (归属:用户管理 parent_id=28)
|
||||
INSERT INTO smart_venue.sys_menu (id,status,name,en_name,url,icon,parent_id,sort,remark,created_id,modified_id,created_time,modified_time,deleted) VALUES
|
||||
(51,0,'健康报告','Health Report','member/health/index','heartbeat',28,0,'会员健康报告',0,0,NOW(),NOW(),0);
|
||||
|
||||
-- 3. 篮球订单统计 (归属:订单管理 parent_id=26)
|
||||
INSERT INTO smart_venue.sys_menu (id,status,name,en_name,url,icon,parent_id,sort,remark,created_id,modified_id,created_time,modified_time,deleted) VALUES
|
||||
(52,0,'篮球订单统计','Basketball Stats','dashboard/basket','line-chart',26,0,'篮球馆订单统计',0,0,NOW(),NOW(),0);
|
||||
|
||||
-- 4. 免责声明 (归属:配置管理 parent_id=36)
|
||||
INSERT INTO smart_venue.sys_menu (id,status,name,en_name,url,icon,parent_id,sort,remark,created_id,modified_id,created_time,modified_time,deleted) VALUES
|
||||
(53,0,'免责声明','Disclaimers','disclaimers/edit','exclamation-triangle',36,7,'免责声明管理',0,0,NOW(),NOW(),0);
|
||||
909
other/sql/init.sql
Normal file
909
other/sql/init.sql
Normal file
@@ -0,0 +1,909 @@
|
||||
/*
|
||||
Navicat MySQL Data Transfer
|
||||
|
||||
Source Server : smartvuene
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 50723
|
||||
Source Host : 120.27.209.4:3306
|
||||
Source Schema : smart_venue
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 50723
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 26/08/2019 17:44:17
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_about_us
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_about_us`;
|
||||
CREATE TABLE `sv_about_us` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`image` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT 'logo',
|
||||
`description` longtext CHARACTER SET utf8mb4 NOT NULL COMMENT '简介',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='关于我们';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_announcement
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_announcement`;
|
||||
CREATE TABLE `sv_announcement` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`tag` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '标签',
|
||||
`title` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '标题',
|
||||
`description` longtext CHARACTER SET utf8mb4 NOT NULL COMMENT '公告介绍',
|
||||
`time` date NOT NULL COMMENT '时间',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`created_id` int(10) DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
`content` varchar(300) CHARACTER SET utf8mb4 NOT NULL COMMENT '短文介绍',
|
||||
`image` varchar(200) CHARACTER SET utf8mb4 NOT NULL COMMENT '图片image',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COMMENT='公告';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_coach
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_coach`;
|
||||
CREATE TABLE `sv_coach` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`nickname` varchar(100) DEFAULT NULL COMMENT '昵称',
|
||||
`avatar` varchar(200) CHARACTER SET utf8mb4 NOT NULL COMMENT '图像',
|
||||
`content` varchar(200) CHARACTER SET utf8mb4 NOT NULL COMMENT '短文介绍',
|
||||
`description` longtext CHARACTER SET utf8mb4 NOT NULL COMMENT '介绍',
|
||||
`qr_code` varchar(200) DEFAULT NULL COMMENT '二维码',
|
||||
`wechat_code` varchar(200) DEFAULT NULL COMMENT '微信二维码',
|
||||
`venue_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '场馆类型',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8 COMMENT='教练';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_device
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_device`;
|
||||
CREATE TABLE `sv_device` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(50) DEFAULT NULL COMMENT '设备名称',
|
||||
`stream` varchar(70) NOT NULL COMMENT '视频流地址',
|
||||
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0未连接 1正在重连 2已连接',
|
||||
`venue_id` int(11) NOT NULL,
|
||||
`venue_type` tinyint(4) NOT NULL,
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `stream` (`stream`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_faq
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_faq`;
|
||||
CREATE TABLE `sv_faq` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`problem` varchar(200) CHARACTER SET utf8mb4 NOT NULL COMMENT '问题',
|
||||
`answer` longtext CHARACTER SET utf8mb4 NOT NULL COMMENT '答案',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='常见问题';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_gift_member_card
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_gift_member_card`;
|
||||
CREATE TABLE `sv_gift_member_card` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0赠送',
|
||||
`member_id` int(11) NOT NULL COMMENT '用户ID',
|
||||
`card_type` varchar(30) NOT NULL COMMENT '会员卡类型',
|
||||
`venue_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '场馆类型',
|
||||
`venue_id` int(11) NOT NULL COMMENT '场馆ID',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=181 DEFAULT CHARSET=utf8mb4 COMMENT='赠送会员卡记录';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_member
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_member`;
|
||||
CREATE TABLE `sv_member` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`nickname` varchar(100) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '昵称',
|
||||
`avatar` varchar(200) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '图像',
|
||||
`status` tinyint(4) DEFAULT '0' COMMENT '状态: 0正常 1禁用',
|
||||
`invite_code` varchar(10) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '邀请码',
|
||||
`created_id` int(10) DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) DEFAULT '0' COMMENT '创建者编号',
|
||||
`mobile` varchar(11) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '手机号',
|
||||
`name` varchar(100) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '姓名',
|
||||
`sex` tinyint(3) DEFAULT '2' COMMENT '0男,1女,2未知',
|
||||
`age` int(4) DEFAULT NULL COMMENT '年龄',
|
||||
`address` varchar(200) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '居住地',
|
||||
`money` decimal(20,2) DEFAULT '0.00' COMMENT '余额',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
`ban_type` tinyint(4) DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `mobile` (`mobile`,`deleted`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=420 DEFAULT CHARSET=utf8 COMMENT='用户基础表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_member_auth
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_member_auth`;
|
||||
CREATE TABLE `sv_member_auth` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`auth_id` varchar(100) DEFAULT NULL COMMENT '用户authID',
|
||||
`mobile` varchar(100) DEFAULT NULL COMMENT '手机号',
|
||||
`member_id` int(11) NOT NULL COMMENT '用户ID',
|
||||
`type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '认证类型:1微信 2手机号',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`created_id` int(10) DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) DEFAULT '0' COMMENT '创建者编号',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `mobile` (`mobile`,`type`,`deleted`),
|
||||
KEY `auth_id` (`auth_id`,`type`,`deleted`),
|
||||
KEY `member_id` (`member_id`,`type`,`deleted`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=774 DEFAULT CHARSET=utf8 COMMENT='用户auth表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_member_bank_card
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_member_bank_card`;
|
||||
CREATE TABLE `sv_member_bank_card` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`member_id` int(11) NOT NULL COMMENT '用户ID',
|
||||
`bank_name` varchar(100) NOT NULL DEFAULT '1' COMMENT '开户行',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`bank_no` varchar(100) NOT NULL COMMENT '银行卡号',
|
||||
`name` varchar(30) DEFAULT NULL COMMENT '姓名',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=100 DEFAULT CHARSET=utf8mb4 COMMENT='用户银行卡';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_member_card
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_member_card`;
|
||||
CREATE TABLE `sv_member_card` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`member_id` int(11) NOT NULL COMMENT '用户ID',
|
||||
`card_type` varchar(30) NOT NULL COMMENT '会员卡类型',
|
||||
`venue_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '场馆类型',
|
||||
`venue_id` int(11) NOT NULL COMMENT '场馆ID',
|
||||
`start_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '有效开始时间',
|
||||
`end_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '有效结束时间',
|
||||
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '激活状态:0 未激活 1激活',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `member_id` (`member_id`,`end_time`,`status`,`deleted`,`venue_type`,`venue_id`) USING BTREE,
|
||||
KEY `member_id_2` (`venue_id`,`venue_type`,`start_time`,`end_time`,`member_id`) USING BTREE,
|
||||
KEY `venue_id` (`venue_id`,`venue_type`,`start_time`,`end_time`,`member_id`,`status`,`deleted`) USING BTREE,
|
||||
KEY `end_time` (`end_time`,`status`,`deleted`),
|
||||
KEY `start_time` (`start_time`,`status`,`deleted`,`member_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=191 DEFAULT CHARSET=utf8mb4 COMMENT='用户会员卡';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_member_card_order
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_member_card_order`;
|
||||
CREATE TABLE `sv_member_card_order` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`pay_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '支付状态:-1已取消 0未支付 1已支付',
|
||||
`member_id` int(11) NOT NULL COMMENT '用户ID',
|
||||
`card_type` varchar(30) NOT NULL COMMENT '会员卡类型',
|
||||
`venue_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '场馆类型',
|
||||
`venue_id` int(11) NOT NULL COMMENT '场馆ID',
|
||||
`order_sn` varchar(30) NOT NULL COMMENT '订单号',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `order_sn` (`order_sn`,`deleted`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8mb4 COMMENT='用户会员卡订单';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_member_enter_veneu_log
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_member_enter_veneu_log`;
|
||||
CREATE TABLE `sv_member_enter_veneu_log` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`member_id` int(11) NOT NULL COMMENT '用户ID',
|
||||
`veneu_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '场馆类型',
|
||||
`venue_id` int(11) NOT NULL COMMENT '场馆ID',
|
||||
`order_sn` varchar(30) DEFAULT NULL COMMENT '入场支付订单',
|
||||
`member_card_id` int(11) DEFAULT NULL COMMENT '用户会员卡ID',
|
||||
`pay_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '入场支付方式:1支付 2会员卡',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
`type` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=793 DEFAULT CHARSET=utf8mb4 COMMENT='用户进场馆记录';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_member_face_info
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_member_face_info`;
|
||||
CREATE TABLE `sv_member_face_info` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`member_id` int(11) NOT NULL COMMENT '用户ID',
|
||||
`face_url` varchar(200) NOT NULL COMMENT '用户人脸图片地址',
|
||||
`face_id` varchar(50) NOT NULL COMMENT '用户人脸识别ID',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`created_id` int(10) DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) DEFAULT '0' COMMENT '创建者编号',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=utf8 COMMENT='用户人脸识别表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_member_lesson_ticket
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_member_lesson_ticket`;
|
||||
CREATE TABLE `sv_member_lesson_ticket` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`veneu_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '场馆类型',
|
||||
`venue_id` int(11) NOT NULL COMMENT '场馆ID',
|
||||
`ticket_id` int(11) NOT NULL COMMENT '课程票号ID',
|
||||
`ticket` varchar(10) NOT NULL COMMENT '课程票号',
|
||||
`lesson_id` int(11) NOT NULL COMMENT '课程ID',
|
||||
`member_id` int(11) NOT NULL COMMENT '用户ID',
|
||||
`order_sn` varchar(30) DEFAULT NULL COMMENT '预约课程支付订单号',
|
||||
`pay_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '入场支付方式:1支付 2会员卡',
|
||||
`member_card_id` int(11) DEFAULT NULL COMMENT '用户会员卡ID',
|
||||
`pay_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '支付状态:-1已取消 0未支付 1已支付',
|
||||
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '使用状态:0未使用 1已使用 2已取消 3已过期未签到',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `order_sn` (`order_sn`),
|
||||
KEY `member_id` (`member_id`,`pay_status`,`status`,`deleted`),
|
||||
KEY `lesson_id` (`lesson_id`,`member_id`,`created_time`),
|
||||
KEY `member_id_2` (`member_id`,`lesson_id`,`pay_status`,`status`,`deleted`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1379 DEFAULT CHARSET=utf8mb4 COMMENT='用户预约的场馆课程票号';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_member_money_log
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_member_money_log`;
|
||||
CREATE TABLE `sv_member_money_log` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '类型:1进场 2购买会员卡 3购买课程 4充值 5退款 6提现申请 7提现失败 8提现审核通过',
|
||||
`money` decimal(10,2) DEFAULT NULL COMMENT '金额',
|
||||
`member_id` int(11) NOT NULL COMMENT '用户ID',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`pay_type` tinyint(4) NOT NULL COMMENT '1微信 2余额 3会员卡 ',
|
||||
`card_type` varchar(100) DEFAULT NULL COMMENT '会员卡类型',
|
||||
`venue_id` int(11) DEFAULT NULL COMMENT '场馆ID',
|
||||
`venue_type` tinyint(4) DEFAULT NULL COMMENT '场馆类型',
|
||||
`lesson_id` int(11) DEFAULT NULL COMMENT '课程ID',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `member_id` (`member_id`,`deleted`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1288 DEFAULT CHARSET=utf8mb4 COMMENT='用户账单(余额,微信,会员卡)记录';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_member_refund
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_member_refund`;
|
||||
CREATE TABLE `sv_member_refund` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`member_id` int(11) NOT NULL COMMENT '用户ID',
|
||||
`lesson_id` int(11) NOT NULL COMMENT '课程ID',
|
||||
`money` decimal(20,2) NOT NULL COMMENT '退款金额',
|
||||
`refund_status` varchar(100) DEFAULT NULL COMMENT 'SUCCESS-退款成功 CHANGE-退款异常 REFUNDCLOSE—退款关闭',
|
||||
`success_time` timestamp NULL DEFAULT NULL COMMENT '退款时间',
|
||||
`order_sn` varchar(100) NOT NULL COMMENT '商户订单号',
|
||||
`transaction_id` varchar(100) DEFAULT NULL COMMENT '微信订单号',
|
||||
`order_id` int(11) NOT NULL COMMENT '订单ID',
|
||||
`refund_id` varchar(100) DEFAULT NULL COMMENT '微信退款单号 ',
|
||||
`out_refund_no` varchar(100) NOT NULL COMMENT '商户退款单号',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`created_id` int(10) DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(4) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8mb4 COMMENT='用户退款记录表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_member_token
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_member_token`;
|
||||
CREATE TABLE `sv_member_token` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`access_token` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
|
||||
`expire_time` datetime DEFAULT NULL,
|
||||
`member_id` int(11) DEFAULT NULL,
|
||||
`refresh_token` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`created_id` int(11) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(11) unsigned DEFAULT '0' COMMENT '更新者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=428 DEFAULT CHARSET=utf8mb4 COMMENT='用户token';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_member_withdraw_apply
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_member_withdraw_apply`;
|
||||
CREATE TABLE `sv_member_withdraw_apply` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`member_id` int(11) NOT NULL COMMENT '用户ID',
|
||||
`bank_name` varchar(100) NOT NULL DEFAULT '1' COMMENT '开户行',
|
||||
`bank_no` varchar(100) NOT NULL COMMENT '银行卡号',
|
||||
`name` varchar(30) DEFAULT NULL COMMENT '姓名',
|
||||
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:-1已拒绝 0审核中 1已提现',
|
||||
`money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '提现金额',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COMMENT='用户提现申请';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_order
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_order`;
|
||||
CREATE TABLE `sv_order` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`pay_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '支付状态:-1已取消 0未支付 1已支付',
|
||||
`member_id` int(11) NOT NULL COMMENT '用户ID',
|
||||
`order_sn` varchar(30) NOT NULL COMMENT '订单号',
|
||||
`parent_order_id` int(11) DEFAULT NULL COMMENT '上级订单号',
|
||||
`trade_sn` varchar(100) DEFAULT NULL COMMENT '外部订单号',
|
||||
`pay_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '支付方式:1微信 2余额 3会员卡',
|
||||
`price` decimal(10,2) NOT NULL COMMENT '价格',
|
||||
`prepay_id` varchar(100) DEFAULT NULL,
|
||||
`pay_time` timestamp NULL DEFAULT NULL COMMENT '支付时间',
|
||||
`to_money` decimal(12,2) DEFAULT NULL COMMENT '余额充值到账金额',
|
||||
`type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '类型:1课程订单 2会员卡订单 3篮球进场 4余额充值',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `order_sn` (`order_sn`,`member_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1484 DEFAULT CHARSET=utf8mb4 COMMENT='订单';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_pay_config
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_pay_config`;
|
||||
CREATE TABLE `sv_pay_config` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`appId` varchar(100) NOT NULL COMMENT '微信appid',
|
||||
`key` varchar(100) NOT NULL COMMENT '支付key',
|
||||
`mchId` varchar(100) NOT NULL COMMENT '商户号',
|
||||
`notifyUrl` varchar(100) NOT NULL COMMENT '微信回调地址',
|
||||
`cancel` varchar(100) NOT NULL COMMENT '微信退款回调地址',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`deleted` tinyint(3) DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`cert` varchar(100) NOT NULL COMMENT '证书位置',
|
||||
`name` varchar(100) NOT NULL COMMENT '支付名称',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='支付参数配置表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_platform
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_platform`;
|
||||
CREATE TABLE `sv_platform` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '平台来源',
|
||||
`key` varchar(200) CHARACTER SET utf8mb4 NOT NULL COMMENT '平台key',
|
||||
`appId` varchar(200) CHARACTER SET utf8mb4 NOT NULL COMMENT '小程序appId',
|
||||
`secret` varchar(200) CHARACTER SET utf8mb4 NOT NULL COMMENT '小程序secret',
|
||||
`templateId` varchar(200) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '推送模板',
|
||||
`created_id` int(10) DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
`cache_key_access_token` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT 'cacheKeyAccessToken',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='平台信息表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_protocol
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_protocol`;
|
||||
CREATE TABLE `sv_protocol` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`content` longtext NOT NULL COMMENT '内容',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源',
|
||||
`created_id` int(10) DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='协议';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_recharge
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_recharge`;
|
||||
CREATE TABLE `sv_recharge` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`recharge_money` decimal(7,2) NOT NULL COMMENT '充值金额',
|
||||
`to_money` decimal(7,2) NOT NULL COMMENT '到账金额',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COMMENT='快速充值配置信息';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_sms
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_sms`;
|
||||
CREATE TABLE `sv_sms` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
|
||||
`platform` tinyint(3) unsigned NOT NULL COMMENT '平台: 1阿里云 2阿里大于 3云通讯 4云片 5蓝创 6聚合',
|
||||
`status` tinyint(3) NOT NULL DEFAULT '0' COMMENT '状态:-1发送失败 0待发送 1发送成功 2已送达',
|
||||
`type` tinyint(3) unsigned NOT NULL COMMENT '类型:1验证类 2通知类',
|
||||
`mobile` char(11) NOT NULL COMMENT '手机号码',
|
||||
`content` varchar(512) NOT NULL DEFAULT '' COMMENT '短信内容',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` datetime NOT NULL COMMENT '创建时间',
|
||||
`modified_time` datetime NOT NULL COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位:0正常 1删除',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_deleted_status` (`deleted`,`status`),
|
||||
KEY `idx_type` (`type`),
|
||||
KEY `idx_platform` (`platform`),
|
||||
KEY `idx_mobile` (`mobile`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=891 DEFAULT CHARSET=utf8mb4 COMMENT='短信记录';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_venue
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_venue`;
|
||||
CREATE TABLE `sv_venue` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '店名称',
|
||||
`address` varchar(200) CHARACTER SET utf8mb4 NOT NULL COMMENT '地址',
|
||||
`longitude` varchar(40) NOT NULL COMMENT '经度',
|
||||
`latitude` varchar(40) NOT NULL COMMENT '纬度',
|
||||
`type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '场馆类型',
|
||||
`list_image` varchar(200) CHARACTER SET utf8mb4 NOT NULL COMMENT '列表图片',
|
||||
`business_start_date` int(11) DEFAULT NULL COMMENT '开始营业星期几',
|
||||
`business_end_date` int(11) DEFAULT NULL COMMENT '结束营业星期几',
|
||||
`business_start_time` time DEFAULT NULL COMMENT '开始营业时间',
|
||||
`business_end_time` time DEFAULT NULL COMMENT '结束营业时间',
|
||||
`business_time` varchar(50) DEFAULT NULL COMMENT '营业时间: 周一至周日 8:00 ~ 9:00',
|
||||
`price` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '单次金额',
|
||||
`contact` varchar(100) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '联系人',
|
||||
`phone` varchar(11) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '联系人号码',
|
||||
`description` longtext CHARACTER SET utf8mb4 NOT NULL COMMENT '场馆介绍',
|
||||
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0正常 1禁用',
|
||||
`geo_hash` varchar(30) DEFAULT NULL COMMENT '坐标空间索引',
|
||||
`card_content` longtext COMMENT '会员卡说明',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
`code_url` varchar(255) DEFAULT NULL,
|
||||
`number` int(11) NOT NULL COMMENT '场馆人数',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `type` (`type`,`deleted`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=utf8 COMMENT='场馆';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_venue_card
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_venue_card`;
|
||||
CREATE TABLE `sv_venue_card` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`card_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '会员卡类型',
|
||||
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0正常 1禁用',
|
||||
`price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '金额',
|
||||
`venue_id` int(11) NOT NULL COMMENT '场馆ID',
|
||||
`venue_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '场馆类型',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `venue_id` (`venue_id`,`venue_type`,`status`,`deleted`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=81 DEFAULT CHARSET=utf8mb4 COMMENT='场馆会员卡';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_venue_image
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_venue_image`;
|
||||
CREATE TABLE `sv_venue_image` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`url` varchar(200) NOT NULL COMMENT '场馆图片',
|
||||
`venue_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '场馆类型',
|
||||
`venue_id` int(11) NOT NULL COMMENT '场馆ID',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `venue_id` (`venue_id`,`venue_type`,`deleted`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=600 DEFAULT CHARSET=utf8mb4 COMMENT='场馆图片';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_venue_lesson
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_venue_lesson`;
|
||||
CREATE TABLE `sv_venue_lesson` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`venue_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '场馆类型',
|
||||
`venue_id` int(11) NOT NULL COMMENT '场馆ID',
|
||||
`name` varchar(100) NOT NULL COMMENT '课程名称',
|
||||
`date` date NOT NULL COMMENT '上课日期 2018-03-30',
|
||||
`start_time` time NOT NULL COMMENT '课程开始时间 8:00',
|
||||
`end_time` time NOT NULL COMMENT '课程结束时间 12:00',
|
||||
`num` int(11) NOT NULL COMMENT '课程总数量',
|
||||
`sale_num` int(11) NOT NULL COMMENT '销售数量',
|
||||
`coach_id` int(11) NOT NULL COMMENT '教练ID',
|
||||
`qr_code` varchar(200) DEFAULT NULL COMMENT '二维码',
|
||||
`description` longtext COMMENT '课程描述',
|
||||
`price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '价格',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:0草稿 1上架',
|
||||
`note` longtext COMMENT '注意事项',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
`type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0普通课程',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `date` (`date`,`venue_id`,`venue_type`,`status`,`deleted`),
|
||||
KEY `coach_id` (`coach_id`,`start_time`,`end_time`,`deleted`),
|
||||
KEY `venue_id` (`venue_id`,`venue_type`,`date`,`deleted`,`status`),
|
||||
KEY `venue_id_2` (`venue_id`,`venue_type`,`date`,`start_time`,`deleted`,`status`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=260 DEFAULT CHARSET=utf8mb4 COMMENT='场馆课程';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_venue_lesson_image
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_venue_lesson_image`;
|
||||
CREATE TABLE `sv_venue_lesson_image` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`lesson_id` int(11) NOT NULL COMMENT '课程ID',
|
||||
`url` varchar(200) NOT NULL COMMENT '课程图片',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1021 DEFAULT CHARSET=utf8mb4 COMMENT='场馆课程图片';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_venue_lesson_tag
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_venue_lesson_tag`;
|
||||
CREATE TABLE `sv_venue_lesson_tag` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(20) NOT NULL COMMENT '课程tag名称',
|
||||
`lesson_id` int(11) NOT NULL COMMENT '课程ID',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1657 DEFAULT CHARSET=utf8mb4 COMMENT='课程拥有的tag名称';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_venue_lesson_tag_config
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_venue_lesson_tag_config`;
|
||||
CREATE TABLE `sv_venue_lesson_tag_config` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(20) NOT NULL COMMENT '课程tag名称',
|
||||
`platform_id` int(11) NOT NULL DEFAULT '1',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4 COMMENT='课程tag名称列表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_venue_lesson_ticket
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_venue_lesson_ticket`;
|
||||
CREATE TABLE `sv_venue_lesson_ticket` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`venue_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '场馆类型',
|
||||
`venue_id` int(11) NOT NULL COMMENT '场馆ID',
|
||||
`ticket` varchar(10) NOT NULL COMMENT '课程票号',
|
||||
`lesson_id` int(11) NOT NULL COMMENT '课程ID',
|
||||
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0未购买 1已购买',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `ticket` (`ticket`,`lesson_id`) USING BTREE,
|
||||
KEY `lesson_id` (`lesson_id`,`deleted`,`status`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2514 DEFAULT CHARSET=utf8mb4 COMMENT='场馆课程票号';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_venue_member
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_venue_member`;
|
||||
CREATE TABLE `sv_venue_member` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`member_id` int(11) DEFAULT NULL,
|
||||
`venue_id` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=211 DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_venue_price
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_venue_price`;
|
||||
CREATE TABLE `sv_venue_price` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`price` decimal(8,2) NOT NULL COMMENT '场馆价格',
|
||||
`venue_id` int(11) NOT NULL COMMENT '场馆ID',
|
||||
`venue_tye` tinyint(4) NOT NULL COMMENT '场馆类型',
|
||||
`star_time` time NOT NULL COMMENT '起始时间',
|
||||
`end_time` time NOT NULL COMMENT '结束时间',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=147 DEFAULT CHARSET=utf8mb4 COMMENT='场馆对应价格表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_venue_type
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_venue_type`;
|
||||
CREATE TABLE `sv_venue_type` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(30) NOT NULL COMMENT '场馆名称',
|
||||
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0 正常 1禁用',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`created_id` int(10) DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) DEFAULT '0' COMMENT '创建者编号',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='场馆类型';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sv_vip_card
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sv_vip_card`;
|
||||
CREATE TABLE `sv_vip_card` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(100) NOT NULL COMMENT '会员卡名称',
|
||||
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0正常 1禁用',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='会员卡配置';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_admin
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_admin`;
|
||||
CREATE TABLE `sys_admin` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
|
||||
`status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '状态:0正常 1禁用',
|
||||
`mobile` char(11) DEFAULT '' COMMENT '手机号码',
|
||||
`password` varchar(64) NOT NULL COMMENT '密码',
|
||||
`salt` varchar(12) NOT NULL COMMENT '盐',
|
||||
`username` varchar(25) DEFAULT '' COMMENT '姓名',
|
||||
`gender` tinyint(3) unsigned DEFAULT '0' COMMENT '性别:0未知 1男 2女',
|
||||
`email` varchar(128) DEFAULT '' COMMENT '邮箱',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_deleted_status` (`deleted`,`status`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4 COMMENT='管理员';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_admin_role
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_admin_role`;
|
||||
CREATE TABLE `sys_admin_role` (
|
||||
`admin_id` int(11) unsigned NOT NULL COMMENT '管理员编号',
|
||||
`role_id` int(11) unsigned NOT NULL COMMENT '角色编号',
|
||||
PRIMARY KEY (`admin_id`,`role_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色用户';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_config
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_config`;
|
||||
CREATE TABLE `sys_config` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
|
||||
`name` varchar(32) NOT NULL COMMENT '名称',
|
||||
`key` varchar(64) NOT NULL COMMENT '键',
|
||||
`value` text NOT NULL COMMENT '值',
|
||||
`en_value` text,
|
||||
`created_id` int(11) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(11) unsigned DEFAULT '0' COMMENT '更新者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
KEY `idx_deleted_key` (`deleted`,`key`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='全局参数';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_menu
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_menu`;
|
||||
CREATE TABLE `sys_menu` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
|
||||
`status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '状态:0正常 1禁用',
|
||||
`name` varchar(32) NOT NULL COMMENT '菜单名称',
|
||||
`en_name` varchar(50) DEFAULT NULL,
|
||||
`url` varchar(128) NOT NULL COMMENT '地址',
|
||||
`icon` varchar(128) NOT NULL COMMENT '菜单图标',
|
||||
`parent_id` int(11) unsigned DEFAULT '0' COMMENT '上级菜单编号',
|
||||
`sort` int(11) unsigned DEFAULT '0' COMMENT '排序',
|
||||
`remark` varchar(512) DEFAULT '' COMMENT '备注说明',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_deleted_status` (`deleted`,`status`),
|
||||
KEY `idx_sort` (`sort`),
|
||||
KEY `idx_parent_id` (`parent_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8mb4 COMMENT='菜单';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_permission
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_permission`;
|
||||
CREATE TABLE `sys_permission` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
|
||||
`name` varchar(25) NOT NULL COMMENT '权限点名称',
|
||||
`key` varchar(45) NOT NULL COMMENT '权限点',
|
||||
`menu_id` int(11) unsigned NOT NULL COMMENT '菜单编号',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_deleted` (`deleted`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COMMENT='权限点';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_role
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_role`;
|
||||
CREATE TABLE `sys_role` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
|
||||
`status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '状态:0正常 1禁用',
|
||||
`name` varchar(32) NOT NULL COMMENT '角色名称',
|
||||
`created_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`modified_id` int(10) unsigned DEFAULT '0' COMMENT '创建者编号',
|
||||
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modified_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` tinyint(3) unsigned DEFAULT '0' COMMENT '删除标识位: 0正常 1删除',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_deleted_status` (`deleted`,`status`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4 COMMENT='角色';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_role_menu
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_role_menu`;
|
||||
CREATE TABLE `sys_role_menu` (
|
||||
`role_id` int(11) unsigned NOT NULL COMMENT '角色编号',
|
||||
`menu_id` int(11) unsigned NOT NULL COMMENT '菜单编号',
|
||||
PRIMARY KEY (`role_id`,`menu_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色菜单';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_role_permission
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_role_permission`;
|
||||
CREATE TABLE `sys_role_permission` (
|
||||
`role_id` int(11) unsigned NOT NULL COMMENT '角色编号',
|
||||
`permission_id` int(11) unsigned NOT NULL COMMENT '权限点编号',
|
||||
PRIMARY KEY (`role_id`,`permission_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色权限点';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
58
other/sql/role-user.sql
Normal file
58
other/sql/role-user.sql
Normal file
@@ -0,0 +1,58 @@
|
||||
-- ==========================================
|
||||
-- 新数据库初始化 - 管理员账号脚本
|
||||
-- ==========================================
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
|
||||
-- 1. 创建超级管理员角色
|
||||
INSERT INTO `sys_role` (
|
||||
`id`, `status`, `name`,
|
||||
`created_id`, `modified_id`,
|
||||
`created_time`, `modified_time`,
|
||||
`deleted`
|
||||
) VALUES (
|
||||
1, 0, '超级管理员',
|
||||
0, 0,
|
||||
NOW(), NOW(),
|
||||
0
|
||||
);
|
||||
|
||||
-- 2. 创建默认管理员账号
|
||||
-- 登录账号: 13800138000(手机号)
|
||||
-- 显示名称: admin
|
||||
-- 密码: 123456
|
||||
-- 盐: abcd
|
||||
-- SHA-1迭代4次后的哈希值: 7c4a8d09ca3762af61e59520943dc26494f8941b
|
||||
INSERT INTO `sys_admin` (
|
||||
`status`, `mobile`, `password`, `salt`, `username`, `gender`, `email`,
|
||||
`created_id`, `modified_id`, `created_time`, `modified_time`, `deleted`
|
||||
) VALUES (
|
||||
0,
|
||||
'admin',
|
||||
'7c4a8d09ca3762af61e59520943dc26494f8941b',
|
||||
'abcd',
|
||||
'admin',
|
||||
1,
|
||||
'admin@smartvenue.com',
|
||||
0, 0,
|
||||
NOW(), NOW(),
|
||||
0
|
||||
);
|
||||
|
||||
-- 3. 分配超级管理员角色
|
||||
INSERT INTO `sys_admin_role` (`admin_id`, `role_id`)
|
||||
VALUES (LAST_INSERT_ID(), 1);
|
||||
|
||||
-- 4. 为超级管理员分配所有菜单权限
|
||||
INSERT INTO `sys_role_menu` (`role_id`, `menu_id`)
|
||||
SELECT 1, id FROM sys_menu WHERE deleted = 0;
|
||||
|
||||
-- 5. 为超级管理员分配所有权限点
|
||||
INSERT INTO `sys_role_permission` (`role_id`, `permission_id`)
|
||||
SELECT 1, id FROM sys_permission WHERE deleted = 0;
|
||||
|
||||
-- 完成提示
|
||||
SELECT '✅ 数据库初始化完成!' AS message;
|
||||
SELECT '👤 登录账号: 13800138000' AS account;
|
||||
SELECT '🔑 登录密码: 123456' AS password;
|
||||
SELECT '💡 显示名称: admin' AS username;
|
||||
3
other/sql/weixinconfig.sql
Normal file
3
other/sql/weixinconfig.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
INSERT INTO smart_venue.sv_pay_config (id, appId, `key`, mchId, notifyUrl, cancel, platform_id, deleted, created_time, cert, name) VALUES(1, 'wx73eb8a9ed10a029d', 'K44NKTHgV9LglJb4J7CfnrzpWJDB6SMx', '1505718751', 'https://api.hongyutiyu.top/weixin/order/Notify', 'https://api.hongyutiyu.top/weixin/order/refund', 1, 0, '2018-07-25 14:15:29.0', '/opt/apiclient_cert.p12', 'face');
|
||||
-- platform
|
||||
INSERT INTO sv_platform (id, name, `key`, appId, secret, templateId, created_id, modified_id, created_time, modified_time, deleted, cache_key_access_token) VALUES(1, '人脸识别', 'SVFACE', 'wxb1f499f0a173865b', '2082295acf1125b5d32b69c7c5af967f', NULL, 0, 0, '2018-08-01 17:36:16.0', '2018-08-01 17:36:16.0', 0, 'sv_face');
|
||||
Reference in New Issue
Block a user