mirror of
https://github.com/PaiGramTeam/MibooGram.git
synced 2024-11-24 17:19:31 +00:00
25 lines
484 B
Python
25 lines
484 B
Python
|
from pydantic import BaseModel
|
||
|
|
||
|
from .enums import ZZZRank
|
||
|
|
||
|
|
||
|
class Buddy(BaseModel):
|
||
|
id: int
|
||
|
""""邦布ID"""
|
||
|
name: str
|
||
|
"""名称"""
|
||
|
name_en: str
|
||
|
"""英文名称"""
|
||
|
icon: str = ""
|
||
|
"""图标"""
|
||
|
rank: ZZZRank = ZZZRank.NULL
|
||
|
""" 星级 """
|
||
|
|
||
|
@property
|
||
|
def webp(self) -> str:
|
||
|
return self.icon if self.icon.endswith("webp") else ""
|
||
|
|
||
|
@property
|
||
|
def png(self) -> str:
|
||
|
return self.icon if self.icon.endswith("png") else ""
|