--- fenglin/TODO/sql/db_stru.sql	2025/04/11 02:24:56	1.13
+++ fenglin/TODO/sql/db_stru.sql	2025/10/11 02:34:05	1.21
@@ -10,6 +10,11 @@ CREATE TABLE `admin_config` (
   `major` tinyint UNSIGNED NOT NULL DEFAULT '0'
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
 
+CREATE TABLE `article_favorite` (
+  `UID` mediumint NOT NULL,
+  `AID` int NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `ban_user_list` (
   `BID` smallint NOT NULL,
   `SID` smallint NOT NULL DEFAULT '0',
@@ -52,7 +57,6 @@ CREATE TABLE `bbs` (
   `excerption` tinyint UNSIGNED NOT NULL DEFAULT '0',
   `ontop` tinyint UNSIGNED NOT NULL DEFAULT '0',
   `static` tinyint UNSIGNED NOT NULL DEFAULT '0',
-  `recommend` tinyint UNSIGNED NOT NULL DEFAULT '0',
   `gen_ex` tinyint UNSIGNED NOT NULL DEFAULT '0',
   `m_del` tinyint UNSIGNED NOT NULL DEFAULT '0',
   `old_SID` smallint NOT NULL DEFAULT '0'
@@ -74,16 +78,6 @@ CREATE TABLE `bbs_content` (
   `content` longtext
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
 
-CREATE TABLE `bbs_ex_dl` (
-  `ID` mediumint NOT NULL,
-  `SID` smallint NOT NULL DEFAULT '0',
-  `url` varchar(255) DEFAULT NULL,
-  `dl_count` mediumint NOT NULL DEFAULT '0',
-  `dl_type` char(1) NOT NULL DEFAULT 'C',
-  `filename` varchar(50) DEFAULT NULL,
-  `enable` tinyint UNSIGNED NOT NULL DEFAULT '1'
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-
 CREATE TABLE `bbs_msg` (
   `MID` int NOT NULL,
   `fromUID` mediumint NOT NULL DEFAULT '0',
@@ -131,19 +125,6 @@ CREATE TABLE `friend_list` (
   `fUID` mediumint NOT NULL DEFAULT '0'
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
 
-CREATE TABLE `journal_data` (
-  `ID` mediumint NOT NULL,
-  `JID` smallint NOT NULL DEFAULT '0',
-  `AID` mediumint NOT NULL DEFAULT '0',
-  `abstract` longtext NOT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-
-CREATE TABLE `journal_index` (
-  `JID` smallint NOT NULL,
-  `dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
-  `enable` tinyint(1) NOT NULL DEFAULT '0'
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-
 CREATE TABLE `section_class` (
   `CID` smallint NOT NULL,
   `cname` varchar(20) DEFAULT NULL,
@@ -152,17 +133,6 @@ CREATE TABLE `section_class` (
   `sort_order` smallint NOT NULL DEFAULT '10'
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
 
-CREATE TABLE `section_class_master` (
-  `MID` smallint NOT NULL,
-  `CID` smallint NOT NULL DEFAULT '0',
-  `UID` mediumint NOT NULL DEFAULT '0',
-  `begin_dt` datetime DEFAULT NULL,
-  `end_dt` datetime DEFAULT NULL,
-  `enable` tinyint UNSIGNED NOT NULL DEFAULT '1',
-  `memo` text,
-  `major` tinyint UNSIGNED NOT NULL DEFAULT '0'
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-
 CREATE TABLE `section_config` (
   `SID` smallint NOT NULL,
   `sname` varchar(20) DEFAULT NULL,
@@ -180,6 +150,8 @@ CREATE TABLE `section_config` (
   `sort_order` smallint NOT NULL DEFAULT '10',
   `ex_gen_tm` datetime DEFAULT NULL,
   `ex_update` tinyint UNSIGNED NOT NULL DEFAULT '0',
+  `ex_menu_tm` datetime DEFAULT NULL,
+  `ex_menu_update` tinyint NOT NULL DEFAULT '0',
   `read_user_level` smallint NOT NULL DEFAULT '0',
   `write_user_level` smallint NOT NULL DEFAULT '0'
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
@@ -201,13 +173,6 @@ CREATE TABLE `section_master` (
   `memo` text
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
 
-CREATE TABLE `section_user_priv` (
-  `SID` smallint NOT NULL DEFAULT '0',
-  `UID` mediumint NOT NULL DEFAULT '0',
-  `read` tinyint UNSIGNED NOT NULL DEFAULT '0',
-  `write` tinyint UNSIGNED NOT NULL DEFAULT '0'
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-
 CREATE TABLE `send_pass_log` (
   `ID` mediumint NOT NULL,
   `UID` mediumint NOT NULL DEFAULT '0',
@@ -318,7 +283,9 @@ CREATE TABLE `user_pubinfo` (
   `sign_2` mediumtext,
   `sign_3` mediumtext,
   `upload_limit` int NOT NULL DEFAULT '1048576',
-  `login_notify_dt` datetime DEFAULT NULL
+  `login_notify_dt` datetime DEFAULT NULL,
+  `user_timezone` varchar(50) NOT NULL DEFAULT '',
+  `game_money` int NOT NULL DEFAULT '0'
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
 
 CREATE TABLE `user_reginfo` (
@@ -362,6 +329,10 @@ ALTER TABLE `admin_config`
   ADD PRIMARY KEY (`AID`),
   ADD KEY `UID` (`UID`);
 
+ALTER TABLE `article_favorite`
+  ADD PRIMARY KEY (`UID`,`AID`),
+  ADD KEY `AID` (`AID`);
+
 ALTER TABLE `ban_user_list`
   ADD PRIMARY KEY (`BID`),
   ADD KEY `ban_UID` (`ban_UID`),
@@ -393,11 +364,6 @@ ALTER TABLE `bbs_content`
   ADD PRIMARY KEY (`CID`),
   ADD KEY `AID` (`AID`);
 
-ALTER TABLE `bbs_ex_dl`
-  ADD PRIMARY KEY (`ID`),
-  ADD UNIQUE KEY `SID` (`SID`),
-  ADD KEY `dl_type` (`dl_type`);
-
 ALTER TABLE `bbs_msg`
   ADD PRIMARY KEY (`MID`),
   ADD KEY `fromUID` (`fromUID`),
@@ -421,23 +387,10 @@ ALTER TABLE `friend_list`
   ADD KEY `fUID` (`fUID`),
   ADD KEY `UID` (`UID`);
 
-ALTER TABLE `journal_data`
-  ADD PRIMARY KEY (`ID`),
-  ADD UNIQUE KEY `AID` (`AID`),
-  ADD KEY `JID` (`JID`);
-
-ALTER TABLE `journal_index`
-  ADD PRIMARY KEY (`JID`);
-
 ALTER TABLE `section_class`
   ADD PRIMARY KEY (`CID`),
   ADD KEY `sort_order` (`sort_order`);
 
-ALTER TABLE `section_class_master`
-  ADD PRIMARY KEY (`MID`),
-  ADD KEY `UID` (`UID`),
-  ADD KEY `CID` (`CID`);
-
 ALTER TABLE `section_config`
   ADD PRIMARY KEY (`SID`),
   ADD KEY `CID` (`CID`),
@@ -455,10 +408,6 @@ ALTER TABLE `section_master`
   ADD KEY `SID` (`SID`),
   ADD KEY `UID` (`UID`);
 
-ALTER TABLE `section_user_priv`
-  ADD PRIMARY KEY (`SID`,`UID`),
-  ADD KEY `UID` (`UID`);
-
 ALTER TABLE `send_pass_log`
   ADD PRIMARY KEY (`ID`),
   ADD KEY `UID` (`UID`);
@@ -533,6 +482,7 @@ ALTER TABLE `user_score_log`
 
 ALTER TABLE `view_article_log`
   ADD PRIMARY KEY (`AID`,`UID`),
+  ADD UNIQUE KEY `UID` (`UID`,`AID`),
   ADD KEY `dt` (`dt`);
 
 ALTER TABLE `visit_log`
@@ -554,9 +504,6 @@ ALTER TABLE `bbs_article_op`
 ALTER TABLE `bbs_content`
   MODIFY `CID` int NOT NULL AUTO_INCREMENT;
 
-ALTER TABLE `bbs_ex_dl`
-  MODIFY `ID` mediumint NOT NULL AUTO_INCREMENT;
-
 ALTER TABLE `bbs_msg`
   MODIFY `MID` int NOT NULL AUTO_INCREMENT;
 
@@ -569,18 +516,9 @@ ALTER TABLE `ex_dir`
 ALTER TABLE `friend_list`
   MODIFY `ID` mediumint NOT NULL AUTO_INCREMENT;
 
-ALTER TABLE `journal_data`
-  MODIFY `ID` mediumint NOT NULL AUTO_INCREMENT;
-
-ALTER TABLE `journal_index`
-  MODIFY `JID` smallint NOT NULL AUTO_INCREMENT;
-
 ALTER TABLE `section_class`
   MODIFY `CID` smallint NOT NULL AUTO_INCREMENT;
 
-ALTER TABLE `section_class_master`
-  MODIFY `MID` smallint NOT NULL AUTO_INCREMENT;
-
 ALTER TABLE `section_config`
   MODIFY `SID` smallint NOT NULL AUTO_INCREMENT;
 
