開發語言:nodejs
架構:Express
資料庫:mysql 5.7(一定要5.7版本)
資料庫工具:Navicat11
開發軟體:VS code/HBuilder X
浏覽器:谷歌浏覽器
資料庫腳本:
DROP TABLE IF EXISTS `config`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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='配置檔案';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `config`
--
LOCK TABLES `config` WRITE;
/*!40000 ALTER TABLE `config` DISABLE KEYS */;
INSERT INTO `config` VALUES (1,'picture1','upload/picture1.jpg'),(2,'picture2','upload/picture2.jpg'),(3,'picture3','upload/picture3.jpg');
/*!40000 ALTER TABLE `config` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `discussxinxifabu`
--
DROP TABLE IF EXISTS `discussxinxifabu`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `discussxinxifabu` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主鍵',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '建立時間',
`refid` bigint(20) NOT NULL COMMENT '關聯表id',
`userid` bigint(20) NOT NULL COMMENT '使用者id',
`nickname` varchar(200) DEFAULT NULL COMMENT '使用者名',
`content` longtext NOT NULL COMMENT '評論内容',
`reply` longtext COMMENT '回複内容',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=157 DEFAULT CHARSET=utf8 COMMENT='資訊釋出評論表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `discussxinxifabu`
--
LOCK TABLES `discussxinxifabu` WRITE;
/*!40000 ALTER TABLE `discussxinxifabu` DISABLE KEYS */;
INSERT INTO `discussxinxifabu` VALUES (151,'2022-06-15 06:56:46',1,1,'使用者名1','評論内容1','回複内容1'),(152,'2022-06-15 06:56:46',2,2,'使用者名2','評論内容2','回複内容2'),(153,'2022-06-15 06:56:46',3,3,'使用者名3','評論内容3','回複内容3'),(154,'2022-06-15 06:56:46',4,4,'使用者名4','評論内容4','回複内容4'),(155,'2022-06-15 06:56:46',5,5,'使用者名5','評論内容5','回複内容5'),(156,'2022-06-15 06:56:46',6,6,'使用者名6','評論内容6','回複内容6');
/*!40000 ALTER TABLE `discussxinxifabu` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `messages`
--
DROP TABLE IF EXISTS `messages`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `messages` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主鍵',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '建立時間',
`userid` bigint(20) NOT NULL COMMENT '留言人id',
`username` varchar(200) DEFAULT NULL COMMENT '使用者名',
`content` longtext NOT NULL COMMENT '留言内容',
`cpicture` varchar(200) DEFAULT NULL COMMENT '留言圖檔',
`reply` longtext COMMENT '回複内容',
`rpicture` varchar(200) DEFAULT NULL COMMENT '回複圖檔',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=147 DEFAULT CHARSET=utf8 COMMENT='留言回報';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `messages`
--
LOCK TABLES `messages` WRITE;
/*!40000 ALTER TABLE `messages` DISABLE KEYS */;
INSERT INTO `messages` VALUES (141,'2022-06-15 06:56:46',1,'使用者名1','留言内容1','upload/messages_cpicture1.jpg','回複内容1','upload/messages_rpicture1.jpg'),(142,'2022-06-15 06:56:46',2,'使用者名2','留言内容2','upload/messages_cpicture2.jpg','回複内容2','upload/messages_rpicture2.jpg'),(143,'2022-06-15 06:56:46',3,'使用者名3','留言内容3','upload/messages_cpicture3.jpg','回複内容3','upload/messages_rpicture3.jpg'),(144,'2022-06-15 06:56:46',4,'使用者名4','留言内容4','upload/messages_cpicture4.jpg','回複内容4','upload/messages_rpicture4.jpg'),(145,'2022-06-15 06:56:46',5,'使用者名5','留言内容5','upload/messages_cpicture5.jpg','回複内容5','upload/messages_rpicture5.jpg'),(146,'2022-06-15 06:56:46',6,'使用者名6','留言内容6','upload/messages_cpicture6.jpg','回複内容6','upload/messages_rpicture6.jpg');
/*!40000 ALTER TABLE `messages` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `news`
--
DROP TABLE IF EXISTS `news`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `news` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主鍵',
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '建立時間',
`title` varchar(200) NOT NULL COMMENT '标題',
`introduction` longtext COMMENT '簡介',
`picture` varchar(200) NOT NULL COMMENT '圖檔',
`content` longtext NOT NULL COMMENT '内容',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=137 DEFAULT CHARSET=utf8 COMMENT='通知公告';
/*!40101 SET character_set_client = @saved_cs_client */;