加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
carrent.sql 11.17 KB
一键复制 编辑 原始数据 按行查看 历史
/*
SQLyog Community v13.1.6 (64 bit)
MySQL - 5.7.30-log : Database - carrent
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!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 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`carrent` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `carrent`;
/*Table structure for table `t_car` */
DROP TABLE IF EXISTS `t_car`;
CREATE TABLE `t_car` (
`car_id` int(11) NOT NULL AUTO_INCREMENT,
`car_name` varchar(20) DEFAULT NULL,
`type` varchar(20) DEFAULT NULL,
`plateNumber` varchar(30) DEFAULT NULL,
`gears` varchar(20) DEFAULT NULL,
`site` varchar(20) DEFAULT NULL,
`dailyrent` varchar(20) DEFAULT NULL,
`deposit` int(11) DEFAULT NULL,
`img` varchar(128) DEFAULT NULL,
`carDesc` varchar(1000) DEFAULT NULL,
`carbrand_id` int(11) DEFAULT NULL,
PRIMARY KEY (`car_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*Data for the table `t_car` */
insert into `t_car`(`car_id`,`car_name`,`type`,`plateNumber`,`gears`,`site`,`dailyrent`,`deposit`,`img`,`carDesc`,`carbrand_id`) values
(1,'桑塔纳','经济型','冀A11111','自动挡','5','100.00',100,'https://carrent-1309694167.cos.ap-beijing.myqcloud.com/avatar/2022-03-17/37a5111d-398e-422d-9486-35c215672c31.jpg','经济实惠,舒适省油',1),
(2,'帝豪','经济型','冀A22222','自动挡','5','100.00',100,'https://carrent-1309694167.cos.ap-beijing.myqcloud.com/avatar/2022-03-17/cc598394-e1bf-4a6d-a88c-5963b7562d83.jpg','经济实惠,舒适省油',2),
(3,'捷达','经济型','冀A33333','自动挡','5','120.00',120,'https://carrent-1309694167.cos.ap-beijing.myqcloud.com/avatar/2022-03-17/97475796-14b1-49fb-be12-cb6f93a8fa66.jpg','经济实惠',1),
(5,'奥迪a4','豪华型','冀A5555','自动挡','5','1000.1',500,'https://carrent-1309694167.cos.ap-beijing.myqcloud.com/avatar/2022-03-17/93888faf-ba67-4bd4-ab26-21d2fcf1c806.jpg','高档奢华',NULL);
/*Table structure for table `t_carbrand` */
DROP TABLE IF EXISTS `t_carbrand`;
CREATE TABLE `t_carbrand` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(30) DEFAULT NULL,
`addTime` datetime DEFAULT NULL,
`img` varchar(128) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*Data for the table `t_carbrand` */
insert into `t_carbrand`(`id`,`name`,`addTime`,`img`) values
(1,'大众','2021-11-28 01:01:01','https://carrent-1309694167.cos.ap-beijing.myqcloud.com/avatar/2022-03-26/4afd4b09-5421-402d-ab89-7c3701dbaf6c.jpg'),
(2,'吉利','2021-12-05 00:00:00','https://carrent-1309694167.cos.ap-beijing.myqcloud.com/avatar/2022-02-22/28f0591d-c853-4d87-a11e-2d2c3d3b7991.jpg');
/*Table structure for table `t_login` */
DROP TABLE IF EXISTS `t_login`;
CREATE TABLE `t_login` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(20) DEFAULT NULL,
`PASSWORD` varchar(1000) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*Data for the table `t_login` */
insert into `t_login`(`id`,`username`,`PASSWORD`) values
(1,'yangdada','$2a$16$L85rc45Kbv3WRnOiV/64NOsthWFAcozmaaVckgXbATc/aYjU/lDqG'),
(2,'hahaha','$2a$10$pKwlB9r1qRKSOF/y.YWRo.yK3.v2ugwsi1Qs/RQtTszs9ZKQZgzMW');
/*Table structure for table `t_member` */
DROP TABLE IF EXISTS `t_member`;
CREATE TABLE `t_member` (
`member_id` int(11) NOT NULL AUTO_INCREMENT,
`member_name` varchar(20) DEFAULT NULL,
`sex` varchar(10) DEFAULT NULL,
`idcard` varchar(18) DEFAULT NULL,
`phoneNumber` varchar(11) DEFAULT NULL,
`regTime` datetime DEFAULT NULL,
`email` varchar(32) DEFAULT NULL,
`birthday` date DEFAULT NULL,
`status` varchar(20) DEFAULT NULL,
`password` varchar(20) DEFAULT NULL,
PRIMARY KEY (`member_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*Data for the table `t_member` */
insert into `t_member`(`member_id`,`member_name`,`sex`,`idcard`,`phoneNumber`,`regTime`,`email`,`birthday`,`status`,`password`) values
(1,'杨大大','男','130111199910101111','15533453333','2022-01-04 01:01:01','3366@qq.com','2021-12-02','正常',NULL),
(2,'姬如雪','女','130111188810102211','18732333999','2022-02-03 00:00:00','1231@qq.com','2021-12-03','正常',NULL),
(3,'李存孝','男','130111188810102212','13300001111','2022-03-03 00:00:00','1231@qq.com','2021-12-03','正常',NULL),
(4,'李星云','男','130111188810102213','13300001112','2022-04-03 00:00:00','1231@qq.com','2021-12-03','正常',NULL),
(5,'李清照','女','130111188810102214','13300001113','2022-05-03 00:00:00','1231@qq.com','2021-12-03','正常',NULL),
(6,'李白','女','130111188810102215','13300001114','2022-06-03 00:00:00','1231@qq.com','2021-12-03','正常',NULL),
(7,'张子凡','女','130111188810102216','13300001115','2022-07-03 00:00:00','1231@qq.com','2021-12-03','正常',NULL),
(8,'女帝','女','130111188810102217','13300001116','2022-08-03 00:00:00','1231@qq.com','2021-12-03','正常',NULL),
(9,'章秋荻','女','130111188810102218','13300001117','2022-09-03 00:00:00','1231@qq.com','2021-12-03','正常',NULL),
(11,'杨一凡','女','130111188810102220','13300001118','2022-11-03 00:00:00','1231@qq.com','2021-12-03','正常',NULL),
(12,'杨大大','女','130111188810102221','13300001119','2022-12-03 00:00:00','1231@qq.com','2021-12-03','正常',NULL),
(13,'景天','男','130111188810102222','13300001110','2022-01-24 00:00:00','1231@qq.com','2021-12-03','正常',NULL),
(14,'重楼','男','130111188810102223','13300001111','2022-03-24 00:00:00','1231@qq.com','2021-12-03','正常',NULL),
(15,'紫霞','男','130111188810102223','13300001111','2022-07-24 00:00:00','1231@qq.com','2021-12-03','正常',NULL),
(48,'杨大大','男','32482737489','18732363909','2022-05-04 15:09:02','3366963763@qq.com','2022-05-04','正常','qq1230');
/*Table structure for table `t_openrend` */
DROP TABLE IF EXISTS `t_openrend`;
CREATE TABLE `t_openrend` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`shop_id` int(11) DEFAULT NULL,
`car_id` int(11) DEFAULT NULL,
`carbrand_id` int(11) DEFAULT NULL,
`rentNum` int(11) DEFAULT NULL,
`createTime` datetime DEFAULT NULL,
`endTime` datetime DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
KEY `FK_Reference_5` (`shop_id`) USING BTREE,
KEY `FK_Reference_6` (`car_id`) USING BTREE,
KEY `FK_Reference_7` (`carbrand_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*Data for the table `t_openrend` */
insert into `t_openrend`(`id`,`shop_id`,`car_id`,`carbrand_id`,`rentNum`,`createTime`,`endTime`) values
(1,1,2,2,26,'2022-01-11 01:01:01','2022-12-13 05:00:00'),
(2,2,1,1,1,'2022-01-11 01:01:01','2022-12-13 05:00:00'),
(3,2,3,1,21,'2022-01-11 01:01:01','2022-12-13 05:00:00'),
(4,2,2,2,4,'2022-01-11 01:01:01','2022-12-13 05:00:00');
/*Table structure for table `t_order` */
DROP TABLE IF EXISTS `t_order`;
CREATE TABLE `t_order` (
`order_id` int(11) NOT NULL,
`orderDate` datetime DEFAULT NULL,
`returnDate` datetime DEFAULT NULL,
`orderStatus` int(11) DEFAULT NULL COMMENT '0-未审核 1-已审核通过',
`car_id` int(11) DEFAULT NULL,
`member_id` int(11) DEFAULT NULL,
`shop_id` int(11) DEFAULT NULL,
`payAmount` varchar(20) DEFAULT NULL,
`payStatus` int(11) DEFAULT NULL,
PRIMARY KEY (`order_id`) USING BTREE,
KEY `FK_Reference_3` (`member_id`) USING BTREE,
KEY `FK_Reference_4` (`car_id`) USING BTREE,
KEY `FK_ReferenceShop` (`shop_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*Data for the table `t_order` */
insert into `t_order`(`order_id`,`orderDate`,`returnDate`,`orderStatus`,`car_id`,`member_id`,`shop_id`,`payAmount`,`payStatus`) values
(42,'2022-05-04 00:00:00','2022-05-04 00:00:00',0,2,48,2,'100',0),
(66,'2022-05-04 00:00:00','2022-05-04 00:00:00',0,2,48,2,'100',0),
(76,'2022-05-04 00:00:00','2022-05-04 00:00:00',0,2,48,2,'100',0),
(109,'2022-04-21 00:00:00','2022-04-21 00:00:00',0,2,48,2,'100',0),
(5554,'2022-04-12 00:00:00','2022-04-12 00:00:00',0,3,48,2,'100',0),
(8667,'2022-04-12 00:00:00','2022-04-12 00:00:00',0,3,48,2,'100',0),
(414522,'2022-04-14 00:00:00','2022-04-14 00:00:00',0,1,48,2,'100',0),
(414614,'2022-04-14 00:00:00','2022-04-14 00:00:00',0,1,17,2,'100',0),
(53155517,'2022-05-04 13:00:00','2022-05-04 19:00:00',1,2,48,2,'100',0);
/*Table structure for table `t_returncar` */
DROP TABLE IF EXISTS `t_returncar`;
CREATE TABLE `t_returncar` (
`trueReturnDate` datetime DEFAULT NULL,
`trueOrderDate` datetime DEFAULT NULL,
`return_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '还车管理id',
`order_id` int(11) DEFAULT NULL COMMENT '订单id',
`return_imageone` varchar(255) DEFAULT NULL COMMENT '还车图片1',
`return_imagetwo` varchar(255) DEFAULT NULL COMMENT '还车图片2',
`return_imagethree` varchar(255) DEFAULT NULL COMMENT '还车图片3',
`return_imagefour` varchar(255) DEFAULT NULL COMMENT '还车图片4',
`return_imagefive` varchar(255) DEFAULT NULL COMMENT '还车图片5',
`compensation_amount` decimal(19,2) DEFAULT NULL COMMENT '赔付金额',
`return_state` int(11) DEFAULT NULL COMMENT '还车状态0待还车-1已还车',
PRIMARY KEY (`return_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=376696 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*Data for the table `t_returncar` */
insert into `t_returncar`(`trueReturnDate`,`trueOrderDate`,`return_id`,`order_id`,`return_imageone`,`return_imagetwo`,`return_imagethree`,`return_imagefour`,`return_imagefive`,`compensation_amount`,`return_state`) values
('2021-12-14 00:00:00','2021-12-13 00:00:00',376688,53155517,'https://carrent-1309694167.cos.ap-beijing.myqcloud.com/avatar/2022-03-27/81a5027b-28ae-4a0c-83be-75e3e75badca.jpg','https://carrent-1309694167.cos.ap-beijing.myqcloud.com/avatar/2022-03-27/15fc6a89-957c-4732-906d-902cf8afc3b9.jpg','https://carrent-1309694167.cos.ap-beijing.myqcloud.com/avatar/2022-03-27/6f9e3d51-0bfc-4117-8702-221f146a9753.jpg','https://carrent-1309694167.cos.ap-beijing.myqcloud.com/avatar/2022-03-27/0299b6f8-2155-4136-ae09-c000e8056db7.jpg','https://carrent-1309694167.cos.ap-beijing.myqcloud.com/avatar/2022-03-27/0b4a3b3e-385b-4bc7-b933-d6f6493f7c0b.jpg',100.00,1);
/*Table structure for table `t_shop` */
DROP TABLE IF EXISTS `t_shop`;
CREATE TABLE `t_shop` (
`shop_id` int(11) NOT NULL AUTO_INCREMENT,
`shop_name` varchar(50) DEFAULT NULL,
`phone` varchar(11) DEFAULT NULL,
`address` varchar(500) DEFAULT NULL,
`openTime` varchar(50) DEFAULT NULL,
PRIMARY KEY (`shop_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*Data for the table `t_shop` */
insert into `t_shop`(`shop_id`,`shop_name`,`phone`,`address`,`openTime`) values
(1,'裕华区店铺','15634118765','河北省石家庄市裕华区','上午9点到下午6点'),
(2,'长安区店铺','18733332577','河北省石家庄市长安区','上午9点-下午6点');
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化