- MartialTeamVO.MemberInfo 添加 gender 字段 - MartialTeamServiceImpl 查询时填充 gender 值 Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
484 lines
28 KiB
SQL
484 lines
28 KiB
SQL
-- MySQL dump 10.13 Distrib 8.0.44, for Linux (x86_64)
|
|
--
|
|
-- Host: localhost Database: martial_db
|
|
-- ------------------------------------------------------
|
|
-- Server version 8.0.44
|
|
|
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
|
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
|
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
|
/*!50503 SET NAMES utf8mb4 */;
|
|
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
|
/*!40103 SET TIME_ZONE='+00:00' */;
|
|
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
|
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
|
|
|
--
|
|
-- Table structure for table `mt_athlete`
|
|
--
|
|
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `mt_athlete` (
|
|
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
|
`user_id` bigint DEFAULT NULL COMMENT '用户ID',
|
|
`name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '姓名',
|
|
`gender` int DEFAULT '1' COMMENT '性别:1-男,2-女',
|
|
`age` int DEFAULT NULL COMMENT '年龄',
|
|
`id_card` varchar(18) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '身份证号',
|
|
`unit_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '单位名称',
|
|
`team_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '队伍名称',
|
|
`id_type` int DEFAULT '1' COMMENT '证件类型:1-身份证',
|
|
`player_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '选手编号(报名成功后生成)',
|
|
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
`update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
|
`is_deleted` tinyint DEFAULT '0' COMMENT '是否删除:0-否,1-是',
|
|
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '000000' COMMENT '租户ID',
|
|
`create_user` bigint DEFAULT NULL COMMENT '创建人',
|
|
`create_dept` bigint DEFAULT NULL COMMENT '创建部门',
|
|
`update_user` bigint DEFAULT NULL COMMENT '更新人',
|
|
`status` int DEFAULT '1' COMMENT '状态',
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
KEY `idx_user_id` (`user_id`) USING BTREE,
|
|
KEY `idx_id_card` (`id_card`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='运动员选手表';
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `mt_certificate`
|
|
--
|
|
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `mt_certificate` (
|
|
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
|
`competition_id` bigint NOT NULL COMMENT '赛事ID',
|
|
`result_id` bigint NOT NULL COMMENT '成绩ID',
|
|
`athlete_id` bigint NOT NULL COMMENT '运动员ID',
|
|
`project_id` bigint NOT NULL COMMENT '项目ID',
|
|
`certificate_type` int DEFAULT '1' COMMENT '证书类型:1-冠军,2-亚军,3-季军,4-优秀奖',
|
|
`certificate_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '证书URL',
|
|
`generate_time` datetime DEFAULT NULL COMMENT '生成时间',
|
|
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
`update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
|
`is_deleted` tinyint DEFAULT '0' COMMENT '是否删除:0-否,1-是',
|
|
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '000000' COMMENT '租户ID',
|
|
`create_user` bigint DEFAULT NULL COMMENT '创建人',
|
|
`create_dept` bigint DEFAULT NULL COMMENT '创建部门',
|
|
`update_user` bigint DEFAULT NULL COMMENT '更新人',
|
|
`status` int DEFAULT '1' COMMENT '状态',
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
KEY `idx_competition_id` (`competition_id`) USING BTREE,
|
|
KEY `idx_result_id` (`result_id`) USING BTREE,
|
|
KEY `idx_athlete_id` (`athlete_id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='证书奖牌表';
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `mt_competition`
|
|
--
|
|
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `mt_competition` (
|
|
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
|
`title` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '赛事名称',
|
|
`organizer` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '主办单位',
|
|
`location` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '地区',
|
|
`venue` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '详细地点',
|
|
`register_start_time` datetime DEFAULT NULL COMMENT '报名开始时间',
|
|
`register_end_time` datetime DEFAULT NULL COMMENT '报名结束时间',
|
|
`match_start_time` datetime DEFAULT NULL COMMENT '比赛开始时间',
|
|
`match_end_time` datetime DEFAULT NULL COMMENT '比赛结束时间',
|
|
`venue_count` int DEFAULT '3' COMMENT '场地数量',
|
|
`match_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '比赛编码',
|
|
`share_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '报名分享链接',
|
|
`info_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '信息发布内容',
|
|
`rules_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '赛事规程内容',
|
|
`schedule_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '活动日程内容',
|
|
`status` int DEFAULT '0' COMMENT '状态:0-待开始,1-报名中,2-编排中,3-进行中,4-已结束',
|
|
`total_register_count` int DEFAULT '0' COMMENT '总报名人数',
|
|
`total_amount` decimal(10,2) DEFAULT '0.00' COMMENT '总金额',
|
|
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
`update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
|
`is_deleted` tinyint DEFAULT '0' COMMENT '是否删除:0-否,1-是',
|
|
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '000000' COMMENT '租户ID',
|
|
`create_user` bigint DEFAULT NULL COMMENT '创建人',
|
|
`create_dept` bigint DEFAULT NULL COMMENT '创建部门',
|
|
`update_user` bigint DEFAULT NULL COMMENT '更新人',
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
KEY `idx_status` (`status`) USING BTREE,
|
|
KEY `idx_match_code` (`match_code`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='赛事表';
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `mt_deduction_item`
|
|
--
|
|
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `mt_deduction_item` (
|
|
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
|
`project_id` bigint NOT NULL COMMENT '项目ID',
|
|
`description` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '扣分项描述',
|
|
`deduction_value` decimal(5,3) DEFAULT '0.000' COMMENT '扣分值',
|
|
`sort_order` int DEFAULT '0' COMMENT '排序',
|
|
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
`update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
|
`is_deleted` tinyint DEFAULT '0' COMMENT '是否删除:0-否,1-是',
|
|
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '000000' COMMENT '租户ID',
|
|
`create_user` bigint DEFAULT NULL COMMENT '创建人',
|
|
`create_dept` bigint DEFAULT NULL COMMENT '创建部门',
|
|
`update_user` bigint DEFAULT NULL COMMENT '更新人',
|
|
`status` int DEFAULT '1' COMMENT '状态',
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
KEY `idx_project_id` (`project_id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='扣分项表';
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `mt_judge`
|
|
--
|
|
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `mt_judge` (
|
|
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
|
`competition_id` bigint NOT NULL COMMENT '赛事ID',
|
|
`judge_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '裁判姓名',
|
|
`invite_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '邀请码',
|
|
`role` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'pub' COMMENT '角色:pub-普通裁判,admin-裁判长',
|
|
`phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '手机号',
|
|
`venue_id` bigint DEFAULT NULL COMMENT '负责场地ID',
|
|
`status` int DEFAULT '1' COMMENT '状态:1-正常,2-禁用',
|
|
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
`update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
|
`is_deleted` tinyint DEFAULT '0' COMMENT '是否删除:0-否,1-是',
|
|
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '000000' COMMENT '租户ID',
|
|
`create_user` bigint DEFAULT NULL COMMENT '创建人',
|
|
`create_dept` bigint DEFAULT NULL COMMENT '创建部门',
|
|
`update_user` bigint DEFAULT NULL COMMENT '更新人',
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
KEY `idx_competition_id` (`competition_id`) USING BTREE,
|
|
KEY `idx_invite_code` (`invite_code`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='裁判表';
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `mt_match_log`
|
|
--
|
|
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `mt_match_log` (
|
|
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
|
`competition_id` bigint NOT NULL COMMENT '赛事ID',
|
|
`schedule_id` bigint NOT NULL COMMENT '编排ID',
|
|
`registration_project_id` bigint NOT NULL COMMENT '报名项目ID',
|
|
`athlete_id` bigint DEFAULT NULL COMMENT '运动员ID',
|
|
`project_id` bigint NOT NULL COMMENT '项目ID',
|
|
`venue_id` bigint NOT NULL COMMENT '场地ID',
|
|
`status` int DEFAULT '1' COMMENT '状态:1-待检录,2-已检录,3-比赛中,4-已完赛',
|
|
`checkin_time` datetime DEFAULT NULL COMMENT '签到时间',
|
|
`start_time` datetime DEFAULT NULL COMMENT '开始时间',
|
|
`end_time` datetime DEFAULT NULL COMMENT '结束时间',
|
|
`operator_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '操作人',
|
|
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
`update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
|
`is_deleted` tinyint DEFAULT '0' COMMENT '是否删除:0-否,1-是',
|
|
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '000000' COMMENT '租户ID',
|
|
`create_user` bigint DEFAULT NULL COMMENT '创建人',
|
|
`create_dept` bigint DEFAULT NULL COMMENT '创建部门',
|
|
`update_user` bigint DEFAULT NULL COMMENT '更新人',
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
KEY `idx_competition_id` (`competition_id`) USING BTREE,
|
|
KEY `idx_schedule_id` (`schedule_id`) USING BTREE,
|
|
KEY `idx_venue_id` (`venue_id`) USING BTREE,
|
|
KEY `idx_status` (`status`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='比赛日志表';
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `mt_project`
|
|
--
|
|
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `mt_project` (
|
|
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
|
`competition_id` bigint NOT NULL COMMENT '赛事ID',
|
|
`project_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '项目名称',
|
|
`project_type` int DEFAULT '1' COMMENT '项目类型:1-单人项目,2-集体项目',
|
|
`price` decimal(10,2) DEFAULT '0.00' COMMENT '项目价格',
|
|
`duration` int DEFAULT '5' COMMENT '单个比赛时长(分钟)',
|
|
`gender` int DEFAULT '0' COMMENT '性别限制:0-不限,1-男,2-女',
|
|
`age_group` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '年龄组别',
|
|
`team_size` int DEFAULT '1' COMMENT '队伍人数(集体项目)',
|
|
`register_count` int DEFAULT '0' COMMENT '报名人数/队伍数',
|
|
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
`update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
|
`is_deleted` tinyint DEFAULT '0' COMMENT '是否删除:0-否,1-是',
|
|
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '000000' COMMENT '租户ID',
|
|
`create_user` bigint DEFAULT NULL COMMENT '创建人',
|
|
`create_dept` bigint DEFAULT NULL COMMENT '创建部门',
|
|
`update_user` bigint DEFAULT NULL COMMENT '更新人',
|
|
`status` int DEFAULT '1' COMMENT '状态',
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
KEY `idx_competition_id` (`competition_id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='项目表';
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `mt_registration_order`
|
|
--
|
|
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `mt_registration_order` (
|
|
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
|
`order_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '订单号',
|
|
`competition_id` bigint NOT NULL COMMENT '赛事ID',
|
|
`user_id` bigint NOT NULL COMMENT '用户ID',
|
|
`contact_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '联系人姓名',
|
|
`contact_phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '联系人电话',
|
|
`total_amount` decimal(10,2) DEFAULT '0.00' COMMENT '总金额',
|
|
`pay_amount` decimal(10,2) DEFAULT '0.00' COMMENT '实付金额',
|
|
`status` int DEFAULT '0' COMMENT '订单状态:0-待支付,1-已支付,2-已取消,3-已退款',
|
|
`pay_time` datetime DEFAULT NULL COMMENT '支付时间',
|
|
`pay_type` int DEFAULT NULL COMMENT '支付方式:1-微信,2-支付宝',
|
|
`participant_count` int DEFAULT '0' COMMENT '参赛人数',
|
|
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
`update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
|
`is_deleted` tinyint DEFAULT '0' COMMENT '是否删除:0-否,1-是',
|
|
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '000000' COMMENT '租户ID',
|
|
`create_user` bigint DEFAULT NULL COMMENT '创建人',
|
|
`create_dept` bigint DEFAULT NULL COMMENT '创建部门',
|
|
`update_user` bigint DEFAULT NULL COMMENT '更新人',
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
UNIQUE KEY `uk_order_no` (`order_no`) USING BTREE,
|
|
KEY `idx_competition_id` (`competition_id`) USING BTREE,
|
|
KEY `idx_user_id` (`user_id`) USING BTREE,
|
|
KEY `idx_status` (`status`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='报名订单表';
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `mt_registration_project`
|
|
--
|
|
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `mt_registration_project` (
|
|
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
|
`registration_order_id` bigint NOT NULL COMMENT '报名订单ID',
|
|
`project_id` bigint NOT NULL COMMENT '项目ID',
|
|
`athlete_id` bigint DEFAULT NULL COMMENT '运动员ID(单人项目)',
|
|
`team_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '队伍名称(集体项目)',
|
|
`project_price` decimal(10,2) DEFAULT '0.00' COMMENT '项目价格',
|
|
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
`update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
|
`is_deleted` tinyint DEFAULT '0' COMMENT '是否删除:0-否,1-是',
|
|
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '000000' COMMENT '租户ID',
|
|
`create_user` bigint DEFAULT NULL COMMENT '创建人',
|
|
`create_dept` bigint DEFAULT NULL COMMENT '创建部门',
|
|
`update_user` bigint DEFAULT NULL COMMENT '更新人',
|
|
`status` int DEFAULT '1' COMMENT '状态',
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
KEY `idx_registration_order_id` (`registration_order_id`) USING BTREE,
|
|
KEY `idx_project_id` (`project_id`) USING BTREE,
|
|
KEY `idx_athlete_id` (`athlete_id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='报名项目关联表';
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `mt_result`
|
|
--
|
|
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `mt_result` (
|
|
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
|
`competition_id` bigint NOT NULL COMMENT '赛事ID',
|
|
`schedule_id` bigint NOT NULL COMMENT '编排ID',
|
|
`registration_project_id` bigint NOT NULL COMMENT '报名项目ID',
|
|
`athlete_id` bigint DEFAULT NULL COMMENT '运动员ID',
|
|
`project_id` bigint NOT NULL COMMENT '项目ID',
|
|
`total_score` decimal(5,3) DEFAULT '0.000' COMMENT '总分',
|
|
`final_score` decimal(5,3) DEFAULT '0.000' COMMENT '最终分数(裁判长可调整)',
|
|
`rank` int DEFAULT NULL COMMENT '排名',
|
|
`chief_adjust_score` decimal(5,3) DEFAULT NULL COMMENT '裁判长调整分数',
|
|
`chief_remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '裁判长备注',
|
|
`status` int DEFAULT '0' COMMENT '状态:0-待评分,1-评分中,2-已完成',
|
|
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
`update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
|
`is_deleted` tinyint DEFAULT '0' COMMENT '是否删除:0-否,1-是',
|
|
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '000000' COMMENT '租户ID',
|
|
`create_user` bigint DEFAULT NULL COMMENT '创建人',
|
|
`create_dept` bigint DEFAULT NULL COMMENT '创建部门',
|
|
`update_user` bigint DEFAULT NULL COMMENT '更新人',
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
KEY `idx_competition_id` (`competition_id`) USING BTREE,
|
|
KEY `idx_schedule_id` (`schedule_id`) USING BTREE,
|
|
KEY `idx_registration_project_id` (`registration_project_id`) USING BTREE,
|
|
KEY `idx_project_id` (`project_id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='成绩表';
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `mt_schedule`
|
|
--
|
|
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `mt_schedule` (
|
|
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
|
`competition_id` bigint NOT NULL COMMENT '赛事ID',
|
|
`venue_id` bigint NOT NULL COMMENT '场地ID',
|
|
`project_id` bigint NOT NULL COMMENT '项目ID',
|
|
`registration_project_id` bigint NOT NULL COMMENT '报名项目ID',
|
|
`time_slot` datetime DEFAULT NULL COMMENT '比赛时间段',
|
|
`estimated_start_time` datetime DEFAULT NULL COMMENT '预计开始时间',
|
|
`estimated_end_time` datetime DEFAULT NULL COMMENT '预计结束时间',
|
|
`actual_start_time` datetime DEFAULT NULL COMMENT '实际开始时间',
|
|
`actual_end_time` datetime DEFAULT NULL COMMENT '实际结束时间',
|
|
`order_no` int DEFAULT '0' COMMENT '出场顺序',
|
|
`status` int DEFAULT '0' COMMENT '状态:0-预编排,1-已确定,2-比赛中,3-已完赛',
|
|
`schedule_type` int DEFAULT '1' COMMENT '编排类型:1-自动编排,2-手动调整',
|
|
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
`update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
|
`is_deleted` tinyint DEFAULT '0' COMMENT '是否删除:0-否,1-是',
|
|
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '000000' COMMENT '租户ID',
|
|
`create_user` bigint DEFAULT NULL COMMENT '创建人',
|
|
`create_dept` bigint DEFAULT NULL COMMENT '创建部门',
|
|
`update_user` bigint DEFAULT NULL COMMENT '更新人',
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
KEY `idx_competition_id` (`competition_id`) USING BTREE,
|
|
KEY `idx_venue_id` (`venue_id`) USING BTREE,
|
|
KEY `idx_project_id` (`project_id`) USING BTREE,
|
|
KEY `idx_time_slot` (`time_slot`) USING BTREE,
|
|
KEY `idx_status` (`status`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='编排表';
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `mt_score`
|
|
--
|
|
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `mt_score` (
|
|
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
|
`competition_id` bigint NOT NULL COMMENT '赛事ID',
|
|
`schedule_id` bigint NOT NULL COMMENT '编排ID',
|
|
`registration_project_id` bigint NOT NULL COMMENT '报名项目ID',
|
|
`athlete_id` bigint DEFAULT NULL COMMENT '运动员ID',
|
|
`project_id` bigint NOT NULL COMMENT '项目ID',
|
|
`venue_id` bigint NOT NULL COMMENT '场地ID',
|
|
`judge_id` bigint NOT NULL COMMENT '裁判ID',
|
|
`score` decimal(5,3) DEFAULT '0.000' COMMENT '评分(保留3位小数)',
|
|
`deduction_items` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '扣分项(JSON格式)',
|
|
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '备注',
|
|
`score_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '评分时间',
|
|
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
`update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
|
`is_deleted` tinyint DEFAULT '0' COMMENT '是否删除:0-否,1-是',
|
|
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '000000' COMMENT '租户ID',
|
|
`create_user` bigint DEFAULT NULL COMMENT '创建人',
|
|
`create_dept` bigint DEFAULT NULL COMMENT '创建部门',
|
|
`update_user` bigint DEFAULT NULL COMMENT '更新人',
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
KEY `idx_competition_id` (`competition_id`) USING BTREE,
|
|
KEY `idx_schedule_id` (`schedule_id`) USING BTREE,
|
|
KEY `idx_registration_project_id` (`registration_project_id`) USING BTREE,
|
|
KEY `idx_judge_id` (`judge_id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='评分表';
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `mt_team_member`
|
|
--
|
|
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `mt_team_member` (
|
|
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
|
`registration_project_id` bigint NOT NULL COMMENT '报名项目ID',
|
|
`athlete_id` bigint NOT NULL COMMENT '运动员ID',
|
|
`role` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '角色',
|
|
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
`update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
|
`is_deleted` tinyint DEFAULT '0' COMMENT '是否删除:0-否,1-是',
|
|
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '000000' COMMENT '租户ID',
|
|
`create_user` bigint DEFAULT NULL COMMENT '创建人',
|
|
`create_dept` bigint DEFAULT NULL COMMENT '创建部门',
|
|
`update_user` bigint DEFAULT NULL COMMENT '更新人',
|
|
`status` int DEFAULT '1' COMMENT '状态',
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
KEY `idx_registration_project_id` (`registration_project_id`) USING BTREE,
|
|
KEY `idx_athlete_id` (`athlete_id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='队员关联表';
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `mt_user`
|
|
--
|
|
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `mt_user` (
|
|
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
|
`openid` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '微信openid',
|
|
`nickname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '昵称',
|
|
`phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '手机号',
|
|
`avatar` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '头像',
|
|
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
`update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
|
`is_deleted` tinyint DEFAULT '0' COMMENT '是否删除:0-否,1-是',
|
|
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '000000' COMMENT '租户ID',
|
|
`create_user` bigint DEFAULT NULL COMMENT '创建人',
|
|
`create_dept` bigint DEFAULT NULL COMMENT '创建部门',
|
|
`update_user` bigint DEFAULT NULL COMMENT '更新人',
|
|
`status` int DEFAULT '1' COMMENT '状态',
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
UNIQUE KEY `uk_openid` (`openid`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='用户表';
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `mt_venue`
|
|
--
|
|
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `mt_venue` (
|
|
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
|
`competition_id` bigint NOT NULL COMMENT '赛事ID',
|
|
`venue_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '场地名称',
|
|
`venue_no` int NOT NULL COMMENT '场地编号',
|
|
`status` int DEFAULT '1' COMMENT '场地状态:1-正常,2-维护中',
|
|
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
`update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
|
`is_deleted` tinyint DEFAULT '0' COMMENT '是否删除:0-否,1-是',
|
|
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '000000' COMMENT '租户ID',
|
|
`create_user` bigint DEFAULT NULL COMMENT '创建人',
|
|
`create_dept` bigint DEFAULT NULL COMMENT '创建部门',
|
|
`update_user` bigint DEFAULT NULL COMMENT '更新人',
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
KEY `idx_competition_id` (`competition_id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='场地表';
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
|
|
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
|
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
|
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
|
|
|
-- Dump completed on 2026-01-21 21:07:28
|