feat(base): 优化环境变量配置
This commit is contained in:
@@ -5,15 +5,25 @@
|
||||
# @Author : xingc
|
||||
# @Desc :
|
||||
|
||||
class BaseException(Exception):
|
||||
class CardBookException(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class SearchCardNotFound(Exception):
|
||||
class ScraperError(CardBookException):
|
||||
""""采集错误"""
|
||||
pass
|
||||
|
||||
|
||||
class SearchCardNotFound(ScraperError):
|
||||
"""搜索卡片不存在"""
|
||||
pass
|
||||
|
||||
|
||||
class SearchCardRetry(Exception):
|
||||
class SearchCardRetry(ScraperError):
|
||||
"""搜索重试"""
|
||||
pass
|
||||
|
||||
|
||||
class WechatApiError(CardBookException):
|
||||
"""微信开放服务调用api错误"""
|
||||
pass
|
||||
|
||||
@@ -20,9 +20,9 @@ class BaseResponse(BaseModel, Generic[T]):
|
||||
|
||||
class Paginated(BaseModel, Generic[T]):
|
||||
list: Optional[T] = None
|
||||
total: int
|
||||
page: int
|
||||
page_size: int
|
||||
total: int = 0
|
||||
page: int = 1
|
||||
page_size: int = 15
|
||||
|
||||
|
||||
class SupportPlatformType(enum.Enum):
|
||||
|
||||
Reference in New Issue
Block a user