Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add api for index #946

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

everpcpc
Copy link
Contributor

No description provided.

Copy link

codecov bot commented Jan 27, 2025

Codecov Report

Attention: Patch coverage is 79.16667% with 45 lines in your changes missing coverage. Please review.

Project coverage is 76.28%. Comparing base (08851fb) to head (67f2a2d).

Files with missing lines Patch % Lines
routes/private/routes/index.ts 81.25% 24 Missing ⚠️
lib/types/fetcher.ts 27.58% 21 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #946      +/-   ##
==========================================
+ Coverage   76.09%   76.28%   +0.19%     
==========================================
  Files         133      135       +2     
  Lines       16094    16299     +205     
  Branches      972      995      +23     
==========================================
+ Hits        12247    12434     +187     
- Misses       3837     3855      +18     
  Partials       10       10              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@everpcpc everpcpc requested a review from trim21 January 27, 2025 08:35
@trim21
Copy link
Contributor

trim21 commented Jan 27, 2025

目录这边有数据库变动,需要先更新一下dev-env

@trim21 trim21 marked this pull request as draft January 27, 2025 10:21
@trim21
Copy link
Contributor

trim21 commented Feb 1, 2025

idx_award 代表 award 年份

idx_rlt_award 代表奖项

普通目录要限制一下 idx_type = 0

image

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- 数据库: `bangumi`
--

-- --------------------------------------------------------

--
-- 表的结构 `chii_index`
--

CREATE TABLE `chii_index` (
  `idx_id` mediumint(8) NOT NULL COMMENT '自动id',
  `idx_type` tinyint(3) UNSIGNED NOT NULL DEFAULT '0',
  `idx_title` varchar(80) NOT NULL COMMENT '标题',
  `idx_desc` mediumtext NOT NULL COMMENT '简介',
  `idx_replies` mediumint(8) UNSIGNED NOT NULL DEFAULT '0' COMMENT '回复数',
  `idx_subject_total` mediumint(8) UNSIGNED NOT NULL DEFAULT '0' COMMENT '内含条目总数',
  `idx_collects` mediumint(8) NOT NULL DEFAULT '0' COMMENT '收藏数',
  `idx_stats` mediumtext NOT NULL,
  `idx_award` mediumint(8) UNSIGNED NOT NULL DEFAULT '0',
  `idx_dateline` int(10) NOT NULL COMMENT '创建时间',
  `idx_lasttouch` int(10) UNSIGNED NOT NULL,
  `idx_uid` mediumint(8) NOT NULL COMMENT '创建人UID',
  `idx_ban` tinyint(1) UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- 转储表的索引
--

--
-- 表的索引 `chii_index`
--
ALTER TABLE `chii_index`
  ADD UNIQUE KEY `mid` (`idx_id`),
  ADD KEY `idx_ban` (`idx_ban`),
  ADD KEY `idx_type` (`idx_type`),
  ADD KEY `idx_uid` (`idx_uid`),
  ADD KEY `idx_collects` (`idx_collects`),
  ADD KEY `idx_award` (`idx_award`);

--
-- 在导出的表使用AUTO_INCREMENT
--

--
-- 使用表AUTO_INCREMENT `chii_index`
--
ALTER TABLE `chii_index`
  MODIFY `idx_id` mediumint(8) NOT NULL AUTO_INCREMENT COMMENT '自动id';
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

@trim21 trim21 marked this pull request as ready for review February 1, 2025 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants