/*
SQLyog Ultimate v11.3 (64 bit)
MySQL - 5.7.32-log : Database - zhunongchanpincaigou
*********************************************************************
*/
/*!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*/`zhunongchanpincaigou` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `zhunongchanpincaigou`;
/*Table structure for table `address` */
DROP TABLE IF EXISTS `address`;
CREATE TABLE `address` (
`id` int(20) NOT NULL AUTO_INCREMENT COMMENT '主键 ',
`yonghu_id` int(20) NOT NULL COMMENT '创建用户',
`address_name` varchar(200) NOT NULL COMMENT '收货人 ',
`address_phone` varchar(200) NOT NULL COMMENT '电话 ',
`address_dizhi` varchar(200) NOT NULL COMMENT '地址 ',
`isdefault_types` int(11) NOT NULL COMMENT '是否默认地址 ',
`insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间 show3',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COMMENT='收货地址';
/*Data for the table `address` */
insert into `address`(`id`,`yonghu_id`,`address_name`,`address_phone`,`address_dizhi`,`isdefault_types`,`insert_time`,`update_time`,`create_time`) values (1,1,'收货人1','17703786901','地址1',1,'2023-03-13 11:12:57','2023-03-13 11:12:57','2023-03-13 11:12:57'),(2,3,'收货人2','17703786902','地址2',1,'2023-03-13 11:12:57','2023-03-13 11:12:57','2023-03-13 11:12:57'),(3,2,'收货人3','17703786903','地址3',1,'2023-03-13 11:12:57','2023-03-13 11:12:57','2023-03-13 11:12:57'),(4,1,'收货人4','17703786904','地址4',1,'2023-03-13 11:12:57','2023-03-13 11:12:57','2023-03-13 11:12:57'),(5,1,'收货人5','17703786905','地址5',2,'2023-03-13 11:12:57','2023-03-13 13:58:02','2023-03-13 11:12:57'),(6,1,'收货人6','17703786906','地址6',1,'2023-03-13 11:12:57','2023-03-13 11:12:57','2023-03-13 11:12:57'),(7,3,'收货人7','17703786907','地址7',1,'2023-03-13 11:12:57','2023-03-13 11:12:57','2023-03-13 11:12:57'),(8,3,'收货人8','17703786908','地址8',1,'2023-03-13 11:12:57','2023-03-13 11:12:57','2023-03-13 11:12:57'),(9,2,'收货人9','17703786909','地址9',1,'2023-03-13 11:12:57','2023-03-13 11:12:57','2023-03-13 11:12:57'),(10,2,'收货人10','17703786910','地址10',1,'2023-03-13 11:12:57','2023-03-13 11:12:57','2023-03-13 11:12:57'),(11,3,'收货人11','17703786911','地址11',1,'2023-03-13 11:12:57','2023-03-13 11:12:57','2023-03-13 11:12:57'),(12,2,'收货人12','17703786912','地址12',1,'2023-03-13 11:12:57','2023-03-13 11:12:57','2023-03-13 11:12:57'),(13,1,'收货人13','17703786913','地址13',1,'2023-03-13 11:12:57','2023-03-13 11:12:57','2023-03-13 11:12:57'),(14,2,'收货人14','17703786914','地址14',1,'2023-03-13 11:12:57','2023-03-13 11:12:57','2023-03-13 11:12:57');
/*Table structure for table `cart` */
DROP TABLE IF EXISTS `cart`;
CREATE TABLE `cart` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`yonghu_id` int(11) DEFAULT NULL COMMENT '所属用户',
`nongchanpin_id` int(11) DEFAULT NULL COMMENT '商品',
`buy_number` int(11) DEFAULT NULL COMMENT '购买数量',
`create_time` timestamp NULL DEFAULT NULL COMMENT '添加时间',
`update_time` timestamp NULL DEFAULT NULL COMMENT '更新时间',
`insert_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='购物车';
/*Data for the table `cart` */
/*Table structure for table `chat` */
DROP TABLE IF EXISTS `chat`;
CREATE TABLE `chat` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`yonghu_id` int(11) DEFAULT NULL COMMENT '提问用户',
`chat_issue` varchar(200) DEFAULT NULL COMMENT '问题',
`issue_time` timestamp NULL DEFAULT NULL COMMENT '问题时间 Search111',
`chat_reply` varchar(200) DEFAULT NULL COMMENT '回复',
`reply_time` timestamp NULL DEFAULT NULL COMMENT '回复时间 Search111',
`zhuangtai_types` int(255) DEFAULT NULL COMMENT '状态',
`chat_types` int(11) DEFAULT NULL COMMENT '数据类型',
`insert_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='客服聊天';
/*Data for the table `chat` */
insert into `chat`(`id`,`yonghu_id`,`chat_issue`,`issue_time`,`chat_reply`,`reply_time`,`zhuangtai_types`,`chat_types`,`insert_time`) values (1,1,'123123','2023-03-13 14:03:00',NULL,NULL,2,1,'2023-03-13 14:03:00'),(2,1,NULL,NULL,'1231231231','2023-03-13 14:05:27',NULL,2,'2023-03-13 14:05:28');
/*Table structure for table `config` */
DROP TABLE IF EXISTS `config`;
CREATE TABLE `config` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(100) NOT NULL COMMENT '配置参数名称',
`value` varchar(100) DEFAULT NULL COMMENT '配置参数值',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='配置文件';
/*Data for the table `config` */
insert into `config`(`id`,`name`,`value`) values (1,'轮播图1','upload/config1.jpg'),(2,'轮播图2','upload/config2.jpg'),(3,'轮播图3','upload/config3.jpg');
/*Table structure for table `dictionary` */
DROP TABLE IF EXISTS `dictionary`;
CREATE TABLE `dictionary` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`dic_code` varchar(200) DEFAULT NULL COMMENT '字段',
`dic_name` varchar(200) DEFAULT NULL COMMENT '字段名',
`code_index` int(11) DEFAULT NULL COMMENT '编码',
`index_name` varchar(200) DEFAULT NULL COMMENT '编码名字 Search111 ',
`super_id` int(11) DEFAULT NULL COMMENT '父字段id',
`beizhu` varchar(200) DEFAULT NULL COMMENT '备注',
`create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=76 DEFAULT CHARSET=utf8 COMMENT='字典';
/*Data for the table `dictionary` */
insert into `dictionary`(`id`,`dic_code`,`dic_name`,`code_index`,`index_name`,`super_id`,`beizhu`,`create_time`) values (38,'chat_types','数据类型',1,'问题',NULL,NULL,'2023-03-13 11:12:37'),(39,'chat_types','数据类型',2,'回复',NULL,NULL,'2023-03-13 11:12:37'),(40,'zhuangtai_types','状态',1,'未回复',NULL,NULL,'2023-03-13 11:12:37'),(41,'zhuangtai_types','状态',2,'已回复',NULL,NULL,'2023-03-13 11:12:37'),(42,'shangjia_types','商家类型',1,'商家类型1',NULL,NULL,'2023-03-13 11:12:37'),(43,'shangjia_types','商家类型',2,'商家类型2',NULL,NULL,'2023-03-13 11:12:37'),(44,'shangjia_types','商家类型',3,'商家类型3',NULL,NULL,'2023-03-13 11:12:37'),(45,'shangxia_types','上下架',1,'上架',NULL,NULL,'2023-03-13 11:12:38'),(46,'shangxia_types','上下架',2,'下架',NULL,NULL,'2023-03-13 11:12:38'),(47,'nongchanpin_types','商品类型',1,'商品类型1',NULL,NULL,'2023-03-13 11:12:38'),(48,'nongchanpin_types','商品类型',2,'商品类型2',NULL,NULL,'2023-03-13 11:12:38'),(49,'nongchanpin_types','商品类型',3,'商品类型3',NULL,NULL,'2023-03-13 11:12:38'),(50,'nongchanpin_collection_types','收藏表类型',1,'收藏',NULL,NULL,'2023-03-13 11:12:38'),(51,'nongchanpin_collection_types','收藏表类型',2,'赞',NULL,NULL,'2023-03-13 11:12:38'),(52,'nongchanpin_collection_types','收藏表类型',3,'踩',NULL,NULL,'2023-03-13 11:12:38'),(53,'nongchanpin_order_types','订单类型',101,'已支付',NULL,NULL,'2023-03-13 11:12:38'),(54,'nongchanpin_order_types','订单类型',102,'已退款',NULL,NULL,'2023-03-13 11:12:38'),(55,'nongchanpin_order_types','订