style: update head icon model

This commit is contained in:
xtaodada 2024-03-28 22:37:54 +08:00
parent 21eb9a999e
commit d2f19569fc
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -12,14 +12,17 @@ class HeadIcon(BaseModel):
icons: List[str]
@property
def icon(self) -> str:
for icon in self.icons:
if icon:
return icon
def webp(self) -> str:
return self.icons[0]
@property
def png(self) -> str:
return self.icons[1]
# 原始数据
class ForHash(BaseModel):
Hash: str