加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
setsailwebsite.sql 7.56 KB
一键复制 编辑 原始数据 按行查看 历史
bon18 提交于 2021-06-15 08:25 . 数据库sql
/*
MySQL Backup
Database: setsailwebsite
Backup Time: 2021-06-14 14:53:48
*/
SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS `setsailwebsite`.`t_category`;
DROP TABLE IF EXISTS `setsailwebsite`.`t_goods`;
DROP TABLE IF EXISTS `setsailwebsite`.`t_goodsdetail`;
DROP TABLE IF EXISTS `setsailwebsite`.`t_goodsdetailtype`;
DROP TABLE IF EXISTS `setsailwebsite`.`t_pic`;
DROP TABLE IF EXISTS `setsailwebsite`.`t_user`;
CREATE TABLE `t_category` (
`cate_id` int NOT NULL AUTO_INCREMENT,
`cate_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`cate_pic` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`parentid` int DEFAULT NULL,
`cate_desc` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
PRIMARY KEY (`cate_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE `t_goods` (
`goods_id` int NOT NULL AUTO_INCREMENT,
`cate_id` int NOT NULL,
`goods_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`goods_disc` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`goods_price` float NOT NULL,
`goods_discount` float DEFAULT NULL,
`goods_stock` int NOT NULL,
`goods_origin` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`goods_material` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`goods_postalfee` float DEFAULT NULL,
`goods_date` date DEFAULT NULL,
`goods_sales` int DEFAULT NULL,
`goods_pic` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`istoday` tinyint(1) DEFAULT '0' COMMENT '是否为今日推荐商品,1:是 0:否',
`goods_pic_big` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
PRIMARY KEY (`goods_id`) USING BTREE,
KEY `cate_id` (`cate_id`) USING BTREE,
CONSTRAINT `cate_id` FOREIGN KEY (`cate_id`) REFERENCES `t_category` (`cate_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE `t_goodsdetail` (
`content_id` int NOT NULL AUTO_INCREMENT,
`goods_id` int NOT NULL DEFAULT '0',
`content` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`type_id` int DEFAULT NULL,
PRIMARY KEY (`content_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE `t_goodsdetailtype` (
`type_id` int NOT NULL AUTO_INCREMENT,
`type_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
PRIMARY KEY (`type_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE `t_pic` (
`pic_id` int NOT NULL AUTO_INCREMENT,
`goods_id` int NOT NULL,
`pic_url` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (`pic_id`) USING BTREE,
KEY `go_id` (`goods_id`) USING BTREE,
CONSTRAINT `go_id` FOREIGN KEY (`goods_id`) REFERENCES `t_goods` (`goods_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=117 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE `t_user` (
`user_id` int NOT NULL AUTO_INCREMENT,
`user_name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`user_pass` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`user_age` tinyint DEFAULT NULL,
`user_sex` tinyint DEFAULT NULL,
`user_email` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`user_rank` tinyint DEFAULT NULL,
PRIMARY KEY (`user_id`) USING BTREE,
UNIQUE KEY `user_name` (`user_name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
BEGIN;
LOCK TABLES `setsailwebsite`.`t_category` WRITE;
DELETE FROM `setsailwebsite`.`t_category`;
INSERT INTO `setsailwebsite`.`t_category` (`cate_id`,`cate_name`,`cate_pic`,`parentid`,`cate_desc`) VALUES (1, '租船', '/images/cate/1.jpg', 16, NULL),(2, '海钓', '/images/cate/4.jpg', 16, NULL),(3, '帮助', '/images/cate/2.jpg', 16, NULL),(4, '潜水', '/images/cate/3.jpg', 16, NULL);
UNLOCK TABLES;
COMMIT;
BEGIN;
LOCK TABLES `setsailwebsite`.`t_goods` WRITE;
DELETE FROM `setsailwebsite`.`t_goods`;
INSERT INTO `setsailwebsite`.`t_goods` (`goods_id`,`cate_id`,`goods_name`,`goods_disc`,`goods_price`,`goods_discount`,`goods_stock`,`goods_origin`,`goods_material`,`goods_postalfee`,`goods_date`,`goods_sales`,`goods_pic`,`istoday`,`goods_pic_big`) VALUES (1, 1, '租赁小型游艇', '0', 399, 299, 0, 'CHN', NULL, 12, NULL, 199, '/images/items/1.jpg', 0, '/images/items/1.jpg'),(2, 1, '租赁普通游艇', '0', 299, 199, 0, 'CHN', NULL, 12, NULL, 169, '/images/items/6.jpg', 0, '/images/items/6.jpg'),(3, 1, '租赁中型游艇', '0', 499, 399, 0, 'CHN', NULL, 12, NULL, 98, '/images/items/5.jpg', 1, '/images/items/5.jpg'),(4, 1, '租赁大型游艇', '0', 699, 599, 0, 'CHN', NULL, 12, NULL, 12, '/images/items/7.jpg', 0, '/images/items/7.jpg'),(5, 1, '租赁帆船', '0', 299, 199, 0, 'CHN', NULL, 12, NULL, 19, '/images/items/8.jpg', 0, '/images/items/8.jpg'),(6, 2, '租赁海钓用具', '0', 299, 199, 0, 'CHN', NULL, 12, NULL, 38, '/images/items/9.jpg', 0, '/images/items/9.jpg'),(7, 2, '购买鱼钩', '0', 99, 59, 0, 'CHN', NULL, 12, NULL, 38, '/images/items/10.jpg', 0, '/images/items/10.jpg'),(8, 2, '租赁专业海钓人员', '0', 299, 199, 0, 'CHN', NULL, 12, NULL, 27, '/images/items/4.jpg', 1, '/images/items/4.jpg'),(9, 3, '租赁海上救生员', '0', 299, 199, 0, 'CHN', NULL, 12, NULL, 112, '/images/items/12.jpg', 1, '/images/items/12.jpg'),(10, 3, '租赁船长', '0', 399, 299, 0, 'CHN', NULL, 12, NULL, 259, '/images/items/11.jpg', 0, '/images/items/11.jpg'),(11, 3, '租赁船长兼救生员', '0', 499, 399, 0, 'CHN', NULL, 12, NULL, 355, '/images/items/2.jpg', 1, '/images/items/2.jpg'),(12, 4, '休闲潜水', '0', 299, 199, 0, 'CHN', NULL, 12, NULL, 465, '/images/items/3.jpg', 1, '/images/items/3.jpg'),(13, 4, '专业潜水', '0', 399, 299, 0, 'CHN', NULL, 12, NULL, 258, '/images/items/13.jpg', 1, '/images/items/13.jpg'),(14, 4, '潜水体验(1次)', '0', 199, 99, 0, 'CHN', NULL, 12, NULL, 675, '/images/items/14.jpg', 0, '/images/items/14.jpg');
UNLOCK TABLES;
COMMIT;
BEGIN;
LOCK TABLES `setsailwebsite`.`t_goodsdetail` WRITE;
DELETE FROM `setsailwebsite`.`t_goodsdetail`;
INSERT INTO `setsailwebsite`.`t_goodsdetail` (`content_id`,`goods_id`,`content`,`type_id`) VALUES (1, 1, '普通版', 2),(2, 1, '豪华版', 2);
UNLOCK TABLES;
COMMIT;
BEGIN;
LOCK TABLES `setsailwebsite`.`t_goodsdetailtype` WRITE;
DELETE FROM `setsailwebsite`.`t_goodsdetailtype`;
INSERT INTO `setsailwebsite`.`t_goodsdetailtype` (`type_id`,`type_name`) VALUES (1, '规格'),(2, '版本');
UNLOCK TABLES;
COMMIT;
BEGIN;
LOCK TABLES `setsailwebsite`.`t_pic` WRITE;
DELETE FROM `setsailwebsite`.`t_pic`;
INSERT INTO `setsailwebsite`.`t_pic` (`pic_id`,`goods_id`,`pic_url`) VALUES (38, 3, '/images/items/5.jpg'),(39, 8, '/images/items/4.jpg'),(40, 9, '/images/items/12.jpg'),(41, 11, '/images/items/2.jpg'),(42, 12, '/images/items/3.jpg'),(43, 13, '/images/items/13.jpg');
UNLOCK TABLES;
COMMIT;
BEGIN;
LOCK TABLES `setsailwebsite`.`t_user` WRITE;
DELETE FROM `setsailwebsite`.`t_user`;
INSERT INTO `setsailwebsite`.`t_user` (`user_id`,`user_name`,`user_pass`,`user_age`,`user_sex`,`user_email`,`user_rank`) VALUES (1, 'user', '123', 22, 1, NULL, 0),(2, 'jiuqiyuliang', '111', 23, 0, NULL, 0),(3, 'admin@163.com', '123456', 22, 0, 'admin@163.com', 1),(4, 'admin', '111', 21, 1, NULL, 1),(43, 'uuuu', '11', 11, 0, '', NULL),(44, 'wwwww', '11', 11, 0, '', NULL),(45, 'qwqw', '11', 11, 0, '', NULL),(48, 'qwqwqwqwq', '111', NULL, 0, '', NULL),(49, 'tttt', '11', 11, 0, '', NULL),(50, 'aaa', '11', 11, 0, '', NULL);
UNLOCK TABLES;
COMMIT;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化