From cec671e8a134385c8af057de45b27f1149f01f44 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Mon, 5 Aug 2024 18:14:24 +0800 Subject: [PATCH] fix rule schema --- app/helper/rule.py | 2 +- app/schemas/rule.py | 8 ++++---- app/schemas/types.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/helper/rule.py b/app/helper/rule.py index 20fdb71c..62f625a4 100644 --- a/app/helper/rule.py +++ b/app/helper/rule.py @@ -17,7 +17,7 @@ class RuleHelper: """ 获取用户所有规则组 """ - rule_groups: List[dict] = self.systemconfig.get(SystemConfigKey.UserRuleGroups) + rule_groups: List[dict] = self.systemconfig.get(SystemConfigKey.UserFilterRuleGroups) if not rule_groups: return [] return [FilterRuleGroup(**group) for group in rule_groups] diff --git a/app/schemas/rule.py b/app/schemas/rule.py index a72c04ab..bec7c265 100644 --- a/app/schemas/rule.py +++ b/app/schemas/rule.py @@ -12,14 +12,14 @@ class CustomRule(BaseModel): # 名称 name: Optional[str] = None # 包含 - include: Optional[list] = [] + include: Optional[str] = None # 排除 - exclude: Optional[list] = [] - # 大小范围 + exclude: Optional[str] = None + # 大小范围(MB) size_range: Optional[str] = None # 最少做种人数 seeders: Optional[str] = None - # 发送时间 + # 发布时间 publish_time: Optional[str] = None diff --git a/app/schemas/types.py b/app/schemas/types.py index af6d8bb9..3703798a 100644 --- a/app/schemas/types.py +++ b/app/schemas/types.py @@ -87,7 +87,7 @@ class SystemConfigKey(Enum): # 用户自定义规则 CustomFilterRules = "CustomFilterRules" # 用户规则组 - UserRuleGroups = "UserRuleGroups" + UserFilterRuleGroups = "UserFilterRuleGroups" # 搜索默认过滤规则组 SearchFilterRuleGroups = "SearchFilterRuleGroups" # 订阅默认过滤规则组