加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
roc.sql 8.25 KB
一键复制 编辑 原始数据 按行查看 历史
铠歌 提交于 2020-08-28 09:56 . user表新增salt字段
/*
Navicat MySQL Data Transfer
Source Server : MySQL80
Source Server Version : 80020
Source Host : localhost:3307
Source Database : rail-ticketing-system
Target Server Type : MYSQL
Target Server Version : 80020
File Encoding : 65001
Date: 2020-08-28 09:56:22
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for admin
-- ----------------------------
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(50) DEFAULT NULL,
`password` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
-- ----------------------------
-- Records of admin
-- ----------------------------
INSERT INTO `admin` VALUES ('1', 'admin', '123456');
INSERT INTO `admin` VALUES ('2', 'admin', 'admin');
-- ----------------------------
-- Table structure for friends
-- ----------------------------
DROP TABLE IF EXISTS `friends`;
CREATE TABLE `friends` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`user_a` int DEFAULT NULL,
`user_b` int DEFAULT NULL,
`rela_a` int DEFAULT NULL,
`rela_b` int DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- ----------------------------
-- Records of friends
-- ----------------------------
-- ----------------------------
-- Table structure for message
-- ----------------------------
DROP TABLE IF EXISTS `message`;
CREATE TABLE `message` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`from_user` varchar(50) DEFAULT NULL COMMENT '发送者',
`to_user` varchar(50) DEFAULT NULL COMMENT '接收者',
`content` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`send_time` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`is_read` int DEFAULT NULL COMMENT '是否已读',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
-- ----------------------------
-- Records of message
-- ----------------------------
INSERT INTO `message` VALUES ('2', '22', '1', '赶快来看看这趟车吧~ 点击立即搜索:<a href=\"www.baidu.com\">K264</a>', '2020-03-06 16:19:28', '1');
INSERT INTO `message` VALUES ('3', '22', '1', '赶快来看看这趟车吧~ 点击立即搜索:<a href=\"www.baidu.com\">K264</a>', '2020-03-06 16:21:08', '1');
-- ----------------------------
-- Table structure for order
-- ----------------------------
DROP TABLE IF EXISTS `order`;
CREATE TABLE `order` (
`id` int NOT NULL AUTO_INCREMENT,
`car_info_id` int NOT NULL,
`person_id` int NOT NULL,
`change_times` int NOT NULL,
`status` int NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of order
-- ----------------------------
INSERT INTO `order` VALUES ('12', '2', '24', '0', '2');
INSERT INTO `order` VALUES ('17', '2', '26', '0', '3');
INSERT INTO `order` VALUES ('18', '2', '26', '0', '3');
INSERT INTO `order` VALUES ('20', '2', '26', '0', '2');
INSERT INTO `order` VALUES ('21', '12', '26', '0', '2');
INSERT INTO `order` VALUES ('22', '4', '24', '0', '2');
INSERT INTO `order` VALUES ('23', '1', '31', '0', '2');
INSERT INTO `order` VALUES ('24', '1', '35', '0', '2');
INSERT INTO `order` VALUES ('25', '1', '35', '0', '2');
INSERT INTO `order` VALUES ('26', '1', '36', '0', '2');
-- ----------------------------
-- Table structure for trips
-- ----------------------------
DROP TABLE IF EXISTS `trips`;
CREATE TABLE `trips` (
`id` int NOT NULL AUTO_INCREMENT,
`orgin_location` varchar(16) NOT NULL,
`destination_location` varchar(16) NOT NULL,
`start_time` datetime NOT NULL,
`reach_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`span_days` int NOT NULL DEFAULT '0' COMMENT '跨越天数',
`car_num` varchar(8) NOT NULL,
`ticket_price` double(6,1) NOT NULL DEFAULT '0.0',
`ticket_num` int NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of trips
-- ----------------------------
INSERT INTO `trips` VALUES ('1', '重庆', '香港', '2020-08-27 00:00:00', '2020-08-27 00:00:00', '0', 'CA435', '547.0', '110');
INSERT INTO `trips` VALUES ('2', '香港', '北京', '2020-08-27 00:00:00', '2020-08-27 00:00:00', '0', 'HJ450', '996.0', '78');
INSERT INTO `trips` VALUES ('12', '大同', '北京', '2020-08-27 00:00:00', '2020-08-27 00:00:00', '0', 'K264', '53.5', '1000');
INSERT INTO `trips` VALUES ('13', '浙江', '厦门', '2020-08-27 00:00:00', '2020-08-27 00:00:00', '0', 'IU234', '1233.0', '89');
INSERT INTO `trips` VALUES ('14', '北京', '美国洛杉矶', '2020-08-27 00:00:00', '2020-08-27 00:00:00', '1', 'TM892', '12000.0', '2');
INSERT INTO `trips` VALUES ('15', '美国西雅图', '青岛', '2020-08-27 00:00:00', '2020-08-27 00:00:00', '1', 'VD344', '12479.0', '5');
INSERT INTO `trips` VALUES ('16', '北京', '成都', '2020-08-27 00:00:00', '2020-08-27 00:00:00', '0', 'US895', '1999.0', '23');
INSERT INTO `trips` VALUES ('17', '成都', '北京', '2020-02-02 00:00:00', '2020-02-02 00:00:00', '0', 'FG556', '1266.0', '5');
INSERT INTO `trips` VALUES ('18', '重庆', '上海', '2020-01-10 14:00:00', '2020-01-10 16:00:00', '0', 'JKS567', '1555.0', '6');
-- ----------------------------
-- Table structure for trips_via
-- ----------------------------
DROP TABLE IF EXISTS `trips_via`;
CREATE TABLE `trips_via` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`car_num` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`station_name` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`reach_time` time DEFAULT NULL,
`start_time` time DEFAULT NULL,
`order_num` int DEFAULT NULL COMMENT '在该趟车中的次序',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=20 DEFAULT CHARSET=latin1;
-- ----------------------------
-- Records of trips_via
-- ----------------------------
INSERT INTO `trips_via` VALUES ('16', 'VD344', '张家口', '04:27:00', '04:38:00', '2');
INSERT INTO `trips_via` VALUES ('15', 'K264', '阳高', '02:40:00', '02:42:00', '1');
INSERT INTO `trips_via` VALUES ('14', 'K264', '大同', '00:00:00', '01:57:00', '0');
INSERT INTO `trips_via` VALUES ('17', 'K264', '宣化', '05:00:00', '05:03:00', '3');
INSERT INTO `trips_via` VALUES ('18', 'K264', '沙城', '05:47:00', '05:54:00', '4');
INSERT INTO `trips_via` VALUES ('19', 'K264', '北京', '08:21:00', '08:21:00', '5');
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int NOT NULL AUTO_INCREMENT,
`username` varchar(50) NOT NULL,
`password` varchar(100) DEFAULT NULL,
`true_name` varchar(16) NOT NULL DEFAULT '',
`id_card_num` varchar(20) NOT NULL DEFAULT '' COMMENT '身份证号码',
`phone_num` varchar(20) NOT NULL DEFAULT '' COMMENT '电话号码',
`age` int NOT NULL DEFAULT '0',
`sex` varchar(2) DEFAULT NULL,
`salt` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`,`username`)
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES ('24', 'ff', 'ff', 'ffeffe', '4502123545689875', '12345678978', '20', '男', null);
INSERT INTO `user` VALUES ('25', 'ww22', 'ww', 'wangc', '440xx1111111111111', '1774518453', '134', '男', null);
INSERT INTO `user` VALUES ('26', '1', '1', '11', '11', '11', '11', '男', null);
INSERT INTO `user` VALUES ('27', '22', '22', '222', '222', '22', '22', '男', null);
INSERT INTO `user` VALUES ('28', '22', '222', '222', '222', '22', '222', '男', null);
INSERT INTO `user` VALUES ('29', '55', '55', '55', '55', '55', '55', '男', null);
INSERT INTO `user` VALUES ('30', '123', '123', '', '', '', '0', null, null);
INSERT INTO `user` VALUES ('31', 'November', '123', '', '', '', '0', null, null);
INSERT INTO `user` VALUES ('32', '111', '111', '', '', '', '0', null, null);
INSERT INTO `user` VALUES ('34', '123', '111', '', '', '', '0', null, null);
INSERT INTO `user` VALUES ('35', 'test', 'test', '', '', '', '0', null, null);
INSERT INTO `user` VALUES ('36', '朱一旦', '123456', '123', '123', '15683025472', '30', '男', null);
INSERT INTO `user` VALUES ('37', 'test1', 'test1', '', '', '', '0', null, null);
INSERT INTO `user` VALUES ('38', 'test2', 'test2', '', '', '', '0', null, null);
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化