管理员:登录,会员管理-增删改查,员工管理-增删改查,课程管理,网站新闻管理,新闻添加编辑,留言管理等
用户: 查看首页,查看关于我们,查看新闻,课程简介,会员注册,会员登录,查看新闻活动,登录后留言,查看留言等功能。
/*
Navicat Premium Data Transfer
Source Server : shizhan
Source Server Type : MySQL
Source Server Version : 50726
Source Host : localhost:3306
Source Schema : pproom
Target Server Type : MySQL
Target Server Version : 50726
File Encoding : 65001
Date: 27/07/2022 17:40:08
*/
DROP DATABASE IF EXISTS pproom;
CREATE DATABASE pproom default character set utf8mb4 collate utf8mb4_general_ci;
USE pproom;
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for class
-- ----------------------------
DROP TABLE IF EXISTS `class`;
CREATE TABLE `class` (
`classid` int(11) NOT NULL AUTO_INCREMENT COMMENT '教学班号',
`course_id` int(11) NULL DEFAULT NULL COMMENT '课程编号',
`classtime` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '上课时间',
`empl_id` int(11) NULL DEFAULT NULL COMMENT '教练编号(员工)',
`classvolume` int(2) NULL DEFAULT NULL COMMENT '班级容量',
PRIMARY KEY (`classid`) USING BTREE,
INDEX `class_courseid_fk`(`course_id`) USING BTREE,
INDEX `class_emploid_fk`(`empl_id`) USING BTREE,
CONSTRAINT `class_ibfk_1` FOREIGN KEY (`course_id`) REFERENCES `course` (`cid`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `class_ibfk_2` FOREIGN KEY (`empl_id`) REFERENCES `employee` (`eid`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 17 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of class
-- ----------------------------
INSERT INTO `class` VALUES (7, 2, '7:00-18:00', 1, 20);
INSERT INTO `class` VALUES (8, 3, '7:00-18:00', 1, 20);
INSERT INTO `class` VALUES (9, 4, '7:00-18:00', 4, 20);
INSERT INTO `class` VALUES (10, 5, '7:00-18:00', NULL, 20);
INSERT INTO `class` VALUES (11, 6, '7:00-18:00', NULL, 20);
INSERT INTO `class` VALUES (12, 8, '7:00-18:00', 1, 20);
INSERT INTO `class` VALUES (13, 18, '7:00-18:00', 2, 20);
INSERT INTO `class` VALUES (14, 19, '7:00-18:00', 6, 20);
INSERT INTO `class` VALUES (15, 20, '7:00-18:00', 1, 20);
INSERT INTO `class` VALUES (16, 21, '7:00-18:00', NULL, 20);
-- ----------------------------
-- Table structure for course
-- ----------------------------
DROP TABLE IF EXISTS `course`;
CREATE TABLE `course` (
`cid` int(255) NOT NULL AUTO_INCREMENT COMMENT '课程id',
`cname` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '课程名称',
`trainer_id` int(11) NULL DEFAULT NULL COMMENT '对应的员工(教练)id',
`ctime` int(11) NULL DEFAULT NULL COMMENT '课时(h)',
`cdesc` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '课程简介',
`cfunction_id` int(11) NULL DEFAULT NULL COMMENT '课程功能id',
`ccate_id` int(11) NULL DEFAULT NULL COMMENT '课程类型id',
`cpic` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '课程图片',
`ccreatetime` datetime(0) NULL DEFAULT NULL COMMENT '课程创建时间',
`cprice` decimal(10, 2) NULL DEFAULT NULL COMMENT '课程价格',
PRIMARY KEY (`cid`) USING BTREE,
INDEX `category_id_fk`(`ccate_id`) USING BTREE,
INDEX `function_id_fk`(`cfunction_id`) USING BTREE,
INDEX `trainer_id_fk`(`trainer_id`) USING BTREE,
CONSTRAINT `course_ibfk_1` FOREIGN KEY (`ccate_id`) REFERENCES `coursecategory` (`cate_id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `course_ibfk_2` FOREIGN KEY (`cfunction_id`) REFERENCES `coursefunction` (`fid`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `course_ibfk_3` FOREIGN KEY (`trainer_id`) REFERENCES `employee` (`eid`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 23 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of course
-- ----------------------------
INSERT INTO `course` VALUES (2, '身体平衡', 1, 20, '身心平衡悄悄在兴起,并备受办公室男女们的青睐。', 1, 1, 'http://localhost:8080/sterngymimages/1620872788262.jpg', '2022-03-23 10:51:24', 2000.00);
INSERT INTO `course` VALUES (3, '身体格斗', 1, 30, '有氧搏击悄悄在兴起,并备受办公室男女们的青睐。出拳、踢腿、挥拳、呐喊,这样也能减肥,就是这么神奇。是“野蛮”的减肥时尚。\r\n\r\n如果说瑜珈、SPA是以一种温柔的方式释放身心。那么,有氧搏击操则是让人在剧烈的运动中完成激情释放。它让都市白领有了另一种释放身心的方式,在磨练身体的同时,精神世界也得到放松和满足。', 1, 1, 'http://localhost:8080/sterngymimages/1620872797104.jpg', '2022-03-23 11:02:02', 2000.00);
INSERT INTO `course` VALUES (4, '古典舞', 4, 2, '古典舞,世界上许多国家和民族都有各具独特风格的古典舞蹈。', 3, 2, 'http://localhost:8080/sterngymimages/1620872805524.jpg', '2022-03-23 11:14:21', 2000.00);
INSERT INTO `course` VALUES (5, '爵士', NULL, 4, '爵士舞即美国现代舞,是一种急促又富动感的节奏型舞蹈,是属于一种外放性的舞蹈。爵士舞蹈最初是非洲舞蹈的延伸,经被贩卖作为奴隶的黑人群体带到美国本土,而在美国逐渐演进形成本土化、大众化的舞蹈。', 3, 2, 'http://localhost:8080/sterngymimages/1620872900736.jpg', '2022-03-23 11:16:42', 2000.00);
INSERT INTO `course` VALUES (6, '减脂骑行', NULL, 3, '高效的便携式共振训练。其特点在于基于共振原理,可以作用于身体的深层肌肉。这些深层肌肉只有在外力作用下反射性的工作,传统运动难以触及。', 1, 5, 'http://localhost:8080/sterngymimages/1620872910362.jpg', '2022-03-23 11:18:14', 2000.00);
INSERT INTO `course` VALUES (8, '游泳', 1, 20, '人在水中游泳,两臂划水同时两腿打水或蹬水,全身肌肉群都参加了运动,可以使全身的肌肉得到良好的锻炼。另外,游泳时,因为水的密度(换句话说就是阻力)和传热性能比空气大(水的热传导系数比空气大26倍,就是说在相同温度的情况下,人体在水里散失热量比在空气里快20多倍,可以有效地消耗热量),所以身体在水中运动消耗的能量比陆地上多。这些能量的供应要靠消耗体内的糖和脂肪来补充。经常进行游泳运动,可以逐渐去掉体内过多的脂肪,而不会长得肥胖。'