/*
 Navicat Premium Data Transfer

 Source Server         : 本机
 Source Server Type    : MySQL
 Source Server Version : 50744
 Source Host           : localhost:3306
 Source Schema         : high-six-exam

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

 Date: 23/07/2024 14:18:36
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for week1_user
-- ----------------------------
DROP TABLE IF EXISTS `week1_user`;
CREATE TABLE `week1_user`  (
  `uid` int(11) NOT NULL AUTO_INCREMENT COMMENT '用户ID',
  `uname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户名',
  `upwd` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户密码',
  `uprice` decimal(10, 2) NULL DEFAULT NULL COMMENT '用户余额',
  `utel` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户手机号',
  PRIMARY KEY (`uid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of week1_user
-- ----------------------------
INSERT INTO `week1_user` VALUES (1, '张三', 'e10adc3949ba59abbe56e057f20f883e', 4759.00, '18778945446');

-- ----------------------------
-- Table structure for week1_car_type
-- ----------------------------
DROP TABLE IF EXISTS `week1_car_type`;
CREATE TABLE `week1_car_type`  (
  `tid` int(11) NOT NULL AUTO_INCREMENT COMMENT '车辆类型',
  `tname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '车辆类型名称',
  `tprice` decimal(10, 2) NULL DEFAULT NULL COMMENT '车辆出租价格',
  PRIMARY KEY (`tid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '车辆类型表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of week1_car_type
-- ----------------------------
INSERT INTO `week1_car_type` VALUES (1, '入门山地车', 1.00);
INSERT INTO `week1_car_type` VALUES (2, '入门公路车', 1.20);
INSERT INTO `week1_car_type` VALUES (3, '专业山地车', 1.30);
INSERT INTO `week1_car_type` VALUES (4, '专业公路车', 1.60);

-- ----------------------------
-- Table structure for week1_car_log
-- ----------------------------
DROP TABLE IF EXISTS `week1_car_log`;
CREATE TABLE `week1_car_log`  (
  `lid` int(11) NOT NULL AUTO_INCREMENT COMMENT '记录ID',
  `cid` int(11) NULL DEFAULT NULL COMMENT '记录车辆',
  `uid` int(11) NULL DEFAULT NULL COMMENT '记录用户',
  `lstadate` datetime NULL DEFAULT NULL COMMENT '租车开始时间',
  `ltime` int(11) NULL DEFAULT NULL COMMENT '用车时间',
  `ldist` decimal(10, 1) NULL DEFAULT NULL COMMENT '行驶距离',
  `lprice` decimal(10, 2) NULL DEFAULT NULL COMMENT '费用',
  `lsta` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '状态 1.骑行中 2.已结束',
  PRIMARY KEY (`lid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '租车日志表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of week1_car_log
-- ----------------------------
INSERT INTO `week1_car_log` VALUES (1, 1, 1, '2024-07-23 03:48:24', 100, 80.0, 114.00, '2');
INSERT INTO `week1_car_log` VALUES (2, 4, 1, '2024-07-23 13:19:53', 30, 24.0, 41.40, '2');
INSERT INTO `week1_car_log` VALUES (3, 4, 1, '2024-07-23 14:07:39', 2, 1.6, 2.80, '2');
INSERT INTO `week1_car_log` VALUES (4, 4, 1, '2024-07-23 13:16:43', 60, 48.0, 82.80, '2');

-- ----------------------------
-- Table structure for week1_car
-- ----------------------------
DROP TABLE IF EXISTS `week1_car`;
CREATE TABLE `week1_car`  (
  `cid` int(11) NOT NULL AUTO_INCREMENT COMMENT '车辆ID',
  `cnumid` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '车辆编号',
  `tid` int(11) NULL DEFAULT NULL COMMENT '车辆类型',
  `csta` int(2) NULL DEFAULT 1 COMMENT '车辆状态 1.未出租 2.已出租',
  PRIMARY KEY (`cid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 21 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '车辆表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of week1_car
-- ----------------------------
INSERT INTO `week1_car` VALUES (1, 'SH648490', 3, 1);
INSERT INTO `week1_car` VALUES (2, 'SH111416', 3, 1);
INSERT INTO `week1_car` VALUES (3, 'SH191504', 2, 1);
INSERT INTO `week1_car` VALUES (4, 'SH130323', 4, 1);
INSERT INTO `week1_car` VALUES (5, 'SH669678', 1, 1);
INSERT INTO `week1_car` VALUES (6, 'SH339286', 1, 1);
INSERT INTO `week1_car` VALUES (7, 'SH976802', 1, 1);
INSERT INTO `week1_car` VALUES (8, 'SH022866', 4, 1);
INSERT INTO `week1_car` VALUES (9, 'SH195292', 1, 1);
INSERT INTO `week1_car` VALUES (10, 'SH327763', 1, 1);
INSERT INTO `week1_car` VALUES (11, 'SH871777', 4, 1);
INSERT INTO `week1_car` VALUES (12, 'SH755751', 4, 1);
INSERT INTO `week1_car` VALUES (13, 'SH384598', 4, 1);
INSERT INTO `week1_car` VALUES (14, 'SH623726', 4, 1);
INSERT INTO `week1_car` VALUES (15, 'SH454936', 2, 1);
INSERT INTO `week1_car` VALUES (16, 'SH791637', 3, 1);
INSERT INTO `week1_car` VALUES (17, 'SH630046', 4, 1);
INSERT INTO `week1_car` VALUES (18, 'SH445904', 2, 1);
INSERT INTO `week1_car` VALUES (19, 'SH482452', 4, 1);
INSERT INTO `week1_car` VALUES (20, 'SH563381', 4, 1);

SET FOREIGN_KEY_CHECKS = 1;
