AzideCupric 39c045c63f subs-io适配引入saa后的新数据库结构 (#219的subs-io部分) (#224)
* 🚚 将nbesf_model统一放到目录中

*  添加v2版本的nbesf

*  使subs_import支持导入多个版本的nbesf文件

*  使用saa的AllSupportedPlatformTarget

* 🚧 use deserialize

---------

Co-authored-by: felinae98 <731499577@qq.com>
2023-06-06 03:30:50 +08:00

32 lines
613 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from abc import ABC
from nonebot_plugin_saa.utils import AllSupportedPlatformTarget as UserInfo
from pydantic import BaseModel
from ....types import Category, Tag
class NBESFBase(BaseModel, ABC):
version: int # 表示nbesf格式版本有效版本从1开始
groups: list = list()
class Config:
orm_mode = True
class SubReceipt(BaseModel):
"""
快递包中每件货物的收据
导入订阅时的Model
"""
user: UserInfo
target: str
target_name: str
platform_name: str
cats: list[Category]
tags: list[Tag]
# default_schedule_weight: int