加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
sql.sql 16.35 KB
一键复制 编辑 原始数据 按行查看 历史
徐梓力 提交于 2024-01-05 07:23 . sql文件
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 50726
Source Host : localhost:3306
Source Schema : snrentalcar
Target Server Type : MySQL
Target Server Version : 50726
File Encoding : 65001
Date: 17/05/2022 12:18:37
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for admin
-- ----------------------------
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
`a_id` int(24) NOT NULL AUTO_INCREMENT,
`a_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`a_pwd` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (`a_id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of admin
-- ----------------------------
INSERT INTO `admin` VALUES (2, 'xzl', 'xuzili995');
-- ----------------------------
-- Table structure for car
-- ----------------------------
DROP TABLE IF EXISTS `car`;
CREATE TABLE `car` (
`car_id` int(24) NOT NULL AUTO_INCREMENT COMMENT '车辆唯一标识ID',
`car_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '车辆名称',
`car_img` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '车辆图片地址',
`car_type` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '车辆类型(属于轿车、商务车)',
`car_feature` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '车辆特点(空间大,蓝牙连接)',
`car_power` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '车辆动力 (2.0T 3.0T)',
`car_seat` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '车辆座位(5座,7座等)',
`car_score` decimal(10, 2) NOT NULL COMMENT '车辆评分',
`car_price` int(24) NOT NULL COMMENT '车辆日租价格',
`car_tank` varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '车辆邮箱容量',
`car_speedbox` varchar(24) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '车辆变速箱(自动,手动)',
`car_ishot` enum('1','0') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '车辆是否热销',
`car_type_id` int(24) NOT NULL COMMENT '车辆类型id',
PRIMARY KEY (`car_id`) USING BTREE,
INDEX `car_type_id`(`car_type_id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 46 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of car
-- ----------------------------
INSERT INTO `car` VALUES (1, '奥迪A4L', 'http://localhost:3000/cars/aodi/ad1.png', '轿车', '空间大/动力强/舒适', '2.0T', '5座', 4.00, 198, '40L', '自动挡', '0', 1);
INSERT INTO `car` VALUES (38, '奥迪A4', 'http://localhost:3000/upload/62ccd430-ca09-11ec-ad16-9d61c763e81e.png', '轿车', '美观', '2.0T', '5座', 5.00, 199, '50L', '自动挡', '1', 1);
INSERT INTO `car` VALUES (45, '奥迪', 'http://localhost:3000/upload/d0394730-d1a0-11ec-9f06-3d0e70f8b8d6.png', 'SUV', '美观', '2.0T', '5座', 4.00, 555, '50L', '自动挡', '0', 1);
INSERT INTO `car` VALUES (44, '奥迪', 'http://localhost:3000/upload/7ca407e0-d1a0-11ec-9f06-3d0e70f8b8d6.png', '轿车', '美观', '2.0T', '5座', 5.00, 666, '50L', '自动挡', '0', 1);
INSERT INTO `car` VALUES (6, '奔驰C200', 'http://localhost:3000/cars/benchi/bc2.png', '轿车', '豪华/运动/蓝牙连接', '2.0T', '5座', 5.00, 548, '40L', '自动挡', '1', 4);
INSERT INTO `car` VALUES (7, '奔驰C180L', 'http://localhost:3000/cars/benchi/bc3.png', '轿车', '蓝牙连接/动感/运动', '1.6T', '5座', 5.00, 450, '40L', '自动挡', '0', 4);
INSERT INTO `car` VALUES (8, '奔驰GLE', 'http://localhost:3000/cars/benchi/bc4.png', '轿车', '舒适/适合亲子/蓝牙连接', '1.5T', '5座', 4.00, 118, '40L', '自动挡', '0', 4);
INSERT INTO `car` VALUES (9, '奔驰S400L', 'http://localhost:3000/cars/benchi/bc5.png', '轿车', '豪华/大气/舒适', '2.0T', '5座', 5.00, 723, '40L', '自动挡', '1', 4);
INSERT INTO `car` VALUES (10, '本田凌派', 'http://localhost:3000/cars/bentian/bt2.png', '轿车', '运动/舒适', '1.5T', '5座', 3.00, 79, '40L', '手动档', '0', 5);
INSERT INTO `car` VALUES (11, '本田奥德赛', 'http://localhost:3000/cars/bentian/bt3.png', 'SUV', '适合亲子/舒适/蓝牙连接', '1.5T', '7座', 4.50, 189, '40L', '自动挡', '0', 5);
INSERT INTO `car` VALUES (12, '本田缤智', 'http://localhost:3000/cars/bentian/bt1.png', '轿车', '时尚/动感/美观', '1.5T', '5座', 4.00, 289, '40L', '自动挡', '1', 5);
INSERT INTO `car` VALUES (13, '本田新飞度', 'http://localhost:3000/cars/bentian/bt7.png', '轿车', '蓝牙连接/美观/时尚', '1.5T', '5座', 4.00, 198, '40L', '自动挡', '0', 5);
INSERT INTO `car` VALUES (14, '别克GL8', 'http://localhost:3000/cars/bieke/bk1.png', 'SUV', '大气/舒适/豪华', '2.0T', '7座', 4.50, 398, '40L', '自动挡', '0', 6);
INSERT INTO `car` VALUES (18, '大众朗逸', 'http://localhost:3000/cars/dazhong/1.png', '轿车', '省油/实惠/经济', '1.6T', '5座', 3.00, 98, '40L', '自动挡', '1', 3);
INSERT INTO `car` VALUES (15, '别克GL8经典', 'http://localhost:3000/cars/bieke/bk2.png', 'SUV', '豪华/大气/舒适', '2.0T', '7座', 4.00, 498, '40L', '自动挡', '1', 6);
INSERT INTO `car` VALUES (16, '别克GL9', 'http://localhost:3000/cars/bieke/bk3.png', 'SUV', '蓝牙连接/舒适/大气', '2.0T', '7座', 4.50, 598, '40L', '自动挡', '1', 6);
INSERT INTO `car` VALUES (17, '别克GL9经典', 'http://localhost:3000/cars/bieke/bk4.png', 'SUV', '运动/舒适/动力强', '2.0T', '7座', 5.00, 789, '40L', '自动挡', '0', 6);
INSERT INTO `car` VALUES (19, '大众高尔夫', 'http://localhost:3000/cars/dazhong/2.png', '轿车', '经典/小巧/操控', '1.2T', '5座', 5.00, 78, '40L', '自动挡', '1', 3);
INSERT INTO `car` VALUES (20, '大众宝来', 'http://localhost:3000/cars/dazhong/3.png', '轿车', '实惠/经济/动感', '1.5T', '5座', 3.00, 108, '40L', '自动挡', '1', 3);
INSERT INTO `car` VALUES (21, '大众速腾 经典', 'http://localhost:3000/cars/dazhong/4.png', '轿车', '省油/实惠/稳定', '1.6T', '5座', 3.00, 98, '40L', '自动挡', '1', 3);
INSERT INTO `car` VALUES (22, '丰田亚洲龙', 'http://localhost:3000/cars/fengtian/ft6.png', '轿车', '倒车影像/适合亲自/新车', '2.0T', '5座', 3.00, 298, '40L', '自动挡', '1', 12);
INSERT INTO `car` VALUES (23, '丰田亚洲狮', 'http://localhost:3000/cars/fengtian/ft3.png', '轿车', '蓝牙连接/动力强/美观', '2.0T', '5座', 5.00, 389, '40L', '自动挡', '0', 12);
INSERT INTO `car` VALUES (24, '丰田富凌', 'http://localhost:3000/cars/fengtian/ft2.png', '轿车', '时尚/小巧/省油', '1.2T', '5座', 5.00, 109, '40L', '自动挡', '1', 12);
INSERT INTO `car` VALUES (25, '丰田RAV4荣放', 'http://localhost:3000/cars/fengtian/ft1.jpg', 'SUV', '适合亲子/蓝牙连接/大气', '2.0T', '5座', 5.00, 499, '40L', '自动挡', '1', 12);
INSERT INTO `car` VALUES (26, '日产天籁', 'http://localhost:3000/cars/richan/rc1.png', '轿车', '省油/操作/经济', '1.2T', '5座', 5.00, 108, '40L', '自动挡', '1', 21);
INSERT INTO `car` VALUES (27, '日产轩逸', 'http://localhost:3000/cars/richan/rc2.png', '轿车', '实惠/动感/稳定', '1.5T', '5座', 4.50, 198, '40L', '自动挡', '1', 21);
INSERT INTO `car` VALUES (28, '日产奇骏', 'http://localhost:3000/cars/richan/rc3.png', '轿车', '时尚/舒适/空间大', '1.5T', '5座', 4.00, 119, '40L', '自动挡', '0', 21);
INSERT INTO `car` VALUES (29, '日产朗逸', 'http://localhost:3000/cars/richan/rc4.png', '轿车', '美观/舒适/大气', '1.5T', '5座', 4.00, 298, '40L', '自动挡', '1', 21);
INSERT INTO `car` VALUES (43, '奥迪2', 'http://localhost:3000/upload/b3c311b0-cae5-11ec-9081-4fcd858689ab.jpg', 'SUV', '美观', '2.0T', '5座', 5.00, 333, '50L', '自动挡', '0', 1);
INSERT INTO `car` VALUES (42, '帝豪', 'http://localhost:3000/upload/c768c820-cabf-11ec-bb76-e93aca1d5216.jpg', 'SUV', '经济', '1.5T', '5座', 4.00, 266, '50L', '自动挡', '0', 1);
-- ----------------------------
-- Table structure for car_order
-- ----------------------------
DROP TABLE IF EXISTS `car_order`;
CREATE TABLE `car_order` (
`order_id` int(64) NOT NULL AUTO_INCREMENT COMMENT '订单id',
`order_code_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '订单号',
`order_renttime` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '租车时间',
`order_returntime` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '还车时间',
`order_carlocation` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '租车 换车地点',
`ocar_id` int(64) NOT NULL COMMENT '外键 关联的是car表中的唯一id 知道是哪一个车辆',
`ouser_id` int(64) NOT NULL COMMENT '外键 关联的是user表中的唯一id 知道是哪一个用户下单了车辆',
`order_success` enum('已取消','已支付') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '已取消' COMMENT '订单是否支付成功',
`order_day` int(64) NOT NULL COMMENT '租赁天数',
`order_price` int(64) NOT NULL COMMENT '订单价格',
PRIMARY KEY (`order_id`) USING BTREE,
INDEX `ouser_id`(`ouser_id`) USING BTREE,
INDEX `ocar_id`(`ocar_id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 31 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of car_order
-- ----------------------------
INSERT INTO `car_order` VALUES (23, '6459098541', '2022年04月25日', '2022年04月23日', '浙江省杭州市临安区锦城街道衣锦街青山湖景区', 1, 3, '已支付', 3, 746);
INSERT INTO `car_order` VALUES (24, '9707340181', '2022年06月15日', '2022年06月7日', '河南省商丘市梁园区前进街道豫东建材大世界金和家苑', 1, 16, '已取消', 9, 1008);
INSERT INTO `car_order` VALUES (25, '6615588705', '2022年06月15日', '2022年06月7日', '河南省商丘市梁园区前进街道豫东建材大世界金和家苑', 1, 16, '已支付', 9, 1008);
INSERT INTO `car_order` VALUES (26, '917639676', '2022年07月8日', '2022年07月6日', '河南省商丘市梁园区前进街道豫东建材大世界金和家苑', 1, 16, '已支付', 3, 378);
INSERT INTO `car_order` VALUES (27, '501085831', '2022年05月6日', '2022年05月4日', '河南省商丘市梁园区前进街道豫东建材大世界金和家苑', 1, 16, '已支付', 3, 468);
INSERT INTO `car_order` VALUES (28, '3883470793', '2022年05月6日', '2022年05月4日', '河南省商丘市梁园区前进街道豫东建材大世界金和家苑', 1, 16, '已支付', 3, 378);
INSERT INTO `car_order` VALUES (22, '3472796755', '2022年04月8日', '2022年04月7日', '浙江省杭州市临安区锦城街道衣锦街青山湖景区', 1, 3, '已支付', 2, 318);
INSERT INTO `car_order` VALUES (29, '5760454949', '2022年05月22日', '2022年05月20日', '河南省商丘市梁园区王楼乡清凉寺大道', 1, 16, '已取消', 3, 403);
INSERT INTO `car_order` VALUES (30, '2592724776', '2022年05月22日', '2022年05月20日', '河南省商丘市梁园区王楼乡清凉寺大道', 1, 16, '已支付', 3, 378);
-- ----------------------------
-- Table structure for car_type
-- ----------------------------
DROP TABLE IF EXISTS `car_type`;
CREATE TABLE `car_type` (
`car_type_id` int(10) NOT NULL AUTO_INCREMENT COMMENT '车辆类型ID',
`car_type_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '车辆类型名称',
PRIMARY KEY (`car_type_id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 22 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of car_type
-- ----------------------------
INSERT INTO `car_type` VALUES (1, '奥迪');
INSERT INTO `car_type` VALUES (2, '宝马');
INSERT INTO `car_type` VALUES (3, '大众');
INSERT INTO `car_type` VALUES (4, '奔驰');
INSERT INTO `car_type` VALUES (5, '本田');
INSERT INTO `car_type` VALUES (6, '别克');
INSERT INTO `car_type` VALUES (7, '比亚迪');
INSERT INTO `car_type` VALUES (8, '长安');
INSERT INTO `car_type` VALUES (9, '福特');
INSERT INTO `car_type` VALUES (10, '吉利');
INSERT INTO `car_type` VALUES (11, '马自达');
INSERT INTO `car_type` VALUES (12, '丰田');
INSERT INTO `car_type` VALUES (13, '野马');
INSERT INTO `car_type` VALUES (14, '沃尔沃');
INSERT INTO `car_type` VALUES (15, '五菱');
INSERT INTO `car_type` VALUES (16, '雷克萨斯');
INSERT INTO `car_type` VALUES (17, '凯迪拉克');
INSERT INTO `car_type` VALUES (18, '哈弗');
INSERT INTO `car_type` VALUES (19, '红旗');
INSERT INTO `car_type` VALUES (20, '现代');
INSERT INTO `car_type` VALUES (21, '日产');
-- ----------------------------
-- Table structure for email_code
-- ----------------------------
DROP TABLE IF EXISTS `email_code`;
CREATE TABLE `email_code` (
`email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`email_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of email_code
-- ----------------------------
INSERT INTO `email_code` VALUES ('1594058210@qq.com', '906226');
INSERT INTO `email_code` VALUES ('1594058210@qq.com', '191043');
INSERT INTO `email_code` VALUES ('1772296071@qq.com', '532109');
INSERT INTO `email_code` VALUES ('1594058210@qq.com', '979463');
INSERT INTO `email_code` VALUES ('1772296071@qq.com', '283887');
INSERT INTO `email_code` VALUES ('2097356144@qq.com', '629792');
INSERT INTO `email_code` VALUES ('2735205868@qq.com', '170402');
-- ----------------------------
-- Table structure for shopcar
-- ----------------------------
DROP TABLE IF EXISTS `shopcar`;
CREATE TABLE `shopcar` (
`shop_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '购物车主键',
`car_id` int(10) NOT NULL COMMENT '车辆信息id',
`user_id` int(10) NOT NULL COMMENT '用户id',
PRIMARY KEY (`shop_id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Records of shopcar
-- ----------------------------
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`user_id` int(12) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户主键“唯一标识id”',
`user_email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户邮箱',
`user_pwd` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户密码',
`user_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '未填写' COMMENT '用户姓名',
`user_phone` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '未填写' COMMENT '用户电话号',
`user_cardId` varchar(225) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '未填写' COMMENT '用户身份证号',
`user_urgent_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '未填写' COMMENT '用户紧急联系人姓名',
`user_urgent_phone` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '未填写' COMMENT '用户紧急联系人电话',
`user_urgent_car01` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '未填写' COMMENT '用户驾驶证上传地址图片01',
`user_urgent_car02` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '未填写' COMMENT '用户驾驶证上传地址图片02',
PRIMARY KEY (`user_id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 18 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES (15, '1594058210@qq.com', 'xuzili123', '未填写', '未填写', '未填写', '未填写', '未填写', '未填写', '未填写');
INSERT INTO `user` VALUES (11, '1772296071@qq.com', '12345fsn', '未填写', '未填写', '未填写', '未填写', '未填写', '未填写', '未填写');
SET FOREIGN_KEY_CHECKS = 1;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化