-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Move python version to 3.12; Add sql_typecast; Rewrite typevar…
… class; fix: some bugs;
- Loading branch information
Showing
14 changed files
with
286 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
from pydantic import BaseModel | ||
|
||
from typing import List, Optional, Dict, Any | ||
|
||
|
||
class BaseComicInfo(BaseModel): | ||
"""BaseComicInfo""" | ||
"""作者,漫画作者""" | ||
author: List[str] | ||
"""封面,漫画封面图片URL""" | ||
cover: str | ||
"""标识符,漫画在所属平台的索引ID""" | ||
id: str | ||
"""名称,漫画名称""" | ||
name: str | ||
|
||
|
||
class ComicInfo(BaseModel): | ||
"""ComicInfo""" | ||
"""章节数,漫画章节数""" | ||
chapters: Optional[int] = None | ||
"""评论量,漫画评论量""" | ||
comments: Optional[int] = None | ||
"""简介,漫画简介""" | ||
description: Optional[str] = None | ||
"""额外信息,源平台携带的其它漫画信息""" | ||
extras: Optional[Dict[str, Any]] = None | ||
"""收藏量,漫画收藏量""" | ||
favorites: Optional[int] = None | ||
"""已收藏,漫画是否已收藏""" | ||
is_favorite: Optional[bool] = None | ||
"""已完结,漫画是否已完结""" | ||
is_finished: Optional[bool] = None | ||
"""已阅读,漫画是否已阅读""" | ||
is_viewed: Optional[bool] = None | ||
"""标签,漫画标签""" | ||
tags: Optional[List[str]] = None | ||
"""更新时间,漫画最近的更新时间戳""" | ||
updated_at: Optional[int] = None | ||
"""阅读量,漫画阅读量""" | ||
views: Optional[int] = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from fastapi import APIRouter, Response, Depends, HTTPException, Form, Request | ||
|
||
from Models.user import User | ||
from Models.requests import ComicSearchReq | ||
from Models.response import ExceptionResponse, StandardResponse | ||
from Services.Database.database import get_db | ||
from Services.Limiter.limiter import limiter | ||
from Services.Security.user import get_current_user | ||
from Services.Modulator.manager import plugin_manager | ||
|
||
core_router = APIRouter(prefix="/core") | ||
|
||
|
||
@core_router.get("/ping") | ||
async def get_status() -> StandardResponse: | ||
return StandardResponse(message="pong") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.