You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
manage/gym-management-system-maste.../gym_management_system.sql

191 lines
13 KiB

DROP DATABASE IF EXISTS gym_management_system ;
CREATE DATABASE gym_management_system CHARACTER SET utf8;
use gym_management_system ;
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for admin
-- ----------------------------
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
`admin_account` int NOT NULL COMMENT '管理员账号',
`admin_password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '管理员密码',
PRIMARY KEY (`admin_account`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of admin
-- ----------------------------
INSERT INTO `admin` VALUES (1001, '123456');
INSERT INTO `admin` VALUES (1002, '123456');
INSERT INTO `admin` VALUES (1003, '123456');
-- ----------------------------
-- Table structure for classtable
-- ----------------------------
DROP TABLE IF EXISTS `class_table`;
CREATE TABLE `class_table` (
`c_id` int NOT NULL AUTO_INCREMENT COMMENT '预约表id',
`class_id` int NULL DEFAULT NULL COMMENT '预约id',
`class_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '器材名称',
`class_begin` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '时间',
`coach` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '地点',
PRIMARY KEY (`c_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of classtable
-- ----------------------------
INSERT INTO `class_table` VALUES (1,10001, '跑步机1', '8:00-9:00', '一号房间');
INSERT INTO `class_table` VALUES (2,10002, '跑步机1', '9:00-10:00', '一号房间');
INSERT INTO `class_table` VALUES (3,10003, '跑步机1', '10:00-11:00', '一号房间');
INSERT INTO `class_table` VALUES (4,10004, '跑步机1', '11:00-12:00', '一号房间');
INSERT INTO `class_table` VALUES (5,10005, '跑步机1', '14:00-15:00', '一号房间');
INSERT INTO `class_table` VALUES (6,10006, '跑步机1', '15:00-16:00', '一号房间');
INSERT INTO `class_table` VALUES (7,10007, '跑步机1', '16:00-17:00', '一号房间');
INSERT INTO `class_table` VALUES (8,10008, '跑步机1', '17:00-18:00', '一号房间');
INSERT INTO `class_table` VALUES (9,10009, '跑步机1', '20:00-21:00', '一号房间');
INSERT INTO `class_table` VALUES (10,10010, '跑步机1', '21:00-22:00', '一号房间');
INSERT INTO `class_table` VALUES (11,10011, '杠铃1', '8:00-9:00', '一号房间');
INSERT INTO `class_table` VALUES (12,10012, '杠铃1', '9:00-10:00', '一号房间');
INSERT INTO `class_table` VALUES (13,10013, '杠铃1', '10:00-11:00', '一号房间');
INSERT INTO `class_table` VALUES (14,10014, '杠铃1', '11:00-12:00', '一号房间');
INSERT INTO `class_table` VALUES (15,10015, '杠铃1', '14:00-15:00', '一号房间');
INSERT INTO `class_table` VALUES (16,10016, '杠铃1', '15:00-16:00', '一号房间');
INSERT INTO `class_table` VALUES (17,10017, '杠铃1', '16:00-17:00', '一号房间');
INSERT INTO `class_table` VALUES (18,10018, '杠铃1', '17:00-18:00', '一号房间');
INSERT INTO `class_table` VALUES (19,10019, '杠铃1', '20:00-21:00', '一号房间');
INSERT INTO `class_table` VALUES (20,10020, '杠铃1', '21:00-22:00', '一号房间');
INSERT INTO `class_table` VALUES (21,10011, '哑铃1', '8:00-9:00', '一号房间');
INSERT INTO `class_table` VALUES (22,10012, '哑铃1', '9:00-10:00', '一号房间');
INSERT INTO `class_table` VALUES (23,10013, '哑铃1', '10:00-11:00', '一号房间');
INSERT INTO `class_table` VALUES (24,10014, '哑铃1', '11:00-12:00', '一号房间');
INSERT INTO `class_table` VALUES (25,10015, '哑铃1', '14:00-15:00', '一号房间');
INSERT INTO `class_table` VALUES (26,10016, '哑铃1', '15:00-16:00', '一号房间');
INSERT INTO `class_table` VALUES (27,10017, '哑铃1', '16:00-17:00', '一号房间');
INSERT INTO `class_table` VALUES (28,10018, '哑铃1', '17:00-18:00', '一号房间');
INSERT INTO `class_table` VALUES (29,10019, '哑铃1', '20:00-21:00', '一号房间');
INSERT INTO `class_table` VALUES (30,10020, '哑铃1', '21:00-22:00', '一号房间');
INSERT INTO `class_table` VALUES (31,10001, '跑步机2', '8:00-9:00', '二号房间');
INSERT INTO `class_table` VALUES (32,10003, '跑步机2', '10:00-11:00', '二号房间');
INSERT INTO `class_table` VALUES (33,10004, '跑步机2', '11:00-12:00', '二号房间');
INSERT INTO `class_table` VALUES (34,10005, '跑步机2', '14:00-15:00', '二号房间');
INSERT INTO `class_table` VALUES (35,10006, '跑步机2', '15:00-16:00', '二号房间');
INSERT INTO `class_table` VALUES (36,10007, '跑步机2', '16:00-17:00', '二号房间');
INSERT INTO `class_table` VALUES (37,10008, '跑步机2', '17:00-18:00', '二号房间');
INSERT INTO `class_table` VALUES (38,10009, '跑步机2', '20:00-21:00', '二号房间');
INSERT INTO `class_table` VALUES (39,10010, '跑步机2', '21:00-22:00', '二号房间');
DROP TABLE IF EXISTS `record_table`;
CREATE TABLE `record_table` (
`date` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '预约时间',
`ruser` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户账号',
`record_id` int NULL DEFAULT NULL COMMENT '预约id',
`record_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '器材名称',
`record_begin` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '时间',
`location` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '地点',
PRIMARY KEY (`date`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
INSERT INTO `record_table` VALUES ('2024-11-18 15:01:20',202009867,10001, '跑步机', '8:00-9:00', '一号房间');
INSERT INTO `record_table` VALUES ('2024-11-18 15:11:20',202009867,10002, '跑步机', '9:00-10:00', '一号房间');
INSERT INTO `record_table` VALUES ('2024-11-18 15:21:20',202009867,10005, '跑步机', '9:00-10:00', '一号房间');
INSERT INTO `record_table` VALUES ('2024-11-18 15:31:20',202009867,10003, '跑步机', '9:00-10:00', '一号房间');
-- ----------------------------
-- Table structure for member
-- ----------------------------
DROP TABLE IF EXISTS `member`;
CREATE TABLE `member` (
`member_account` int NOT NULL COMMENT '用户账号',
`member_password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户密码',
`member_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户姓名',
`member_gender` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '用户性别',
`member_age` int NULL DEFAULT NULL COMMENT '用户年龄',
`member_height` int NULL DEFAULT NULL COMMENT '用户身高',
`member_weight` int NULL DEFAULT NULL COMMENT '用户体重',
`member_phone` bigint NULL DEFAULT NULL COMMENT '用户电话',
PRIMARY KEY (`member_account`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of member
-- ----------------------------
INSERT INTO `member` VALUES (202009867, '123456', '张三', '', 24, 182, 60, 13515548482);
INSERT INTO `member` VALUES (202100788, '123456', '李四', '', 31, 178, 60, 13131554873);
INSERT INTO `member` VALUES (202132539, '123456', '王五', '', 31, 178, 60, 13154875489);
INSERT INTO `member` VALUES (202186416, '123456', '马六', '', 23, 160, 45, 13124576857);
INSERT INTO `member` VALUES (202106725, '123456', 'Tom', '', 24, 178, 88, 13758784959);
INSERT INTO `member` VALUES (202183406, '123456', 'Tylor', '', 19, 170, 60, 13786457488);
INSERT INTO `member` VALUES (202176587, '123456', 'Jack', '', 33, 177, 90, 13767546666);
INSERT INTO `member` VALUES (202156754, '123456', 'Mike', '', 36, 166, 67, 13786532448);
INSERT INTO `member` VALUES (202153468, '123456', 'Emma', '', 25, 173, 44, 13786457124);
INSERT INTO `member` VALUES (202121345, '123456', 'Ava', '', 28, 160, 40, 13754457488);
INSERT INTO `member` VALUES (202189776, '123456', 'Chloe', '', 27, 170, 50, 13986337489);
INSERT INTO `member` VALUES (202123664, '123456', 'Lily', '', 25, 165, 51, 15986457423);
-- ----------------------------
-- Table structure for equipment
-- ----------------------------
DROP TABLE IF EXISTS `equipment`;
CREATE TABLE `equipment` (
`equipment_id` int NOT NULL AUTO_INCREMENT COMMENT '器材id',
`equipment_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '器材名称',
`equipment_location` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '器材位置',
`equipment_status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '器材状态',
`equipment_message` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '器材备注信息',
PRIMARY KEY (`equipment_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of equipment
-- ----------------------------
INSERT INTO `equipment` VALUES (1, '哑铃1', '1号房间', '正常', '');
INSERT INTO `equipment` VALUES (2, '杠铃1', '2号房间', '损坏', '待维修');
INSERT INTO `equipment` VALUES (3, '跑步机1', '2号房间', '维修中', '联系厂家维修');
INSERT INTO `equipment` VALUES (4, '跑步机2', '2号房间', '正常', '');
INSERT INTO `equipment` VALUES (5, '跑步机3', '2号房间', '正常', '');
INSERT INTO `equipment` VALUES (6, '杠铃1', '1号房间', '正常', '');
INSERT INTO `equipment` VALUES (7, '杠铃2', '1号房间', '正常', '');
-- ----------------------------
-- Records for target_record
-- ----------------------------
DROP TABLE IF EXISTS `target_record`;
CREATE TABLE `target_record` (
`tuser` int NULL DEFAULT NULL COMMENT '用户账号',
`tp_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目名称',
`tep_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '器材名称',
`tr_location` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '器材位置',
`ttime` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '锻炼时长',
`tdate` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci Not NULL COMMENT '锻炼时间',
PRIMARY KEY (`tdate`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
INSERT INTO `target_record` VALUES (202009867,'跑步','跑步机','1号房','30min','2021年1月2日 10:20');
SET FOREIGN_KEY_CHECKS = 1;
DROP TABLE IF EXISTS `real_record`;
CREATE TABLE `real_record` (
`ruser` int NULL DEFAULT NULL COMMENT '用户账号',
`rp_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目名称',
`rep_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '器材名称',
`rr_location` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '器材位置',
`rtime` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '锻炼时长',
`rdate` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci Not NULL COMMENT '锻炼时间',
PRIMARY KEY (`rdate`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
INSERT INTO `real_record` VALUES (202009867,'跑步','跑步机','1号房','30min','2021年1月2日 10:20');
INSERT INTO `real_record` VALUES (202009867,'跑步','跑步机','1号房','30min','2021年1月3日 10:21');
INSERT INTO `real_record` VALUES (202009867,'跑步','跑步机','1号房','30min','2021年1月4日 11:20');
INSERT INTO `real_record` VALUES (202009867,'跑步','跑步机','1号房','30min','2021年1月8日 10:20');
INSERT INTO `real_record` VALUES (202009867,'跑步','跑步机','1号房','30min','2021年1月9日 14:20');
INSERT INTO `real_record` VALUES (202009867,'跑步','跑步机','1号房','30min','2021年1月1日 10:90');