fix 优化推荐跳转

feat 消息落库
This commit is contained in:
jxxghp
2024-03-14 19:44:15 +08:00
parent 06e4b9ad83
commit 6e607ca89f
6 changed files with 54 additions and 17 deletions

View File

@ -38,6 +38,17 @@ class Notification(BaseModel):
# 用户ID
userid: Optional[Union[str, int]] = None
def dict(self):
return {
"channel": self.channel.value if self.channel else None,
"mtype": self.mtype.value if self.mtype else None,
"title": self.title,
"text": self.text,
"image": self.image,
"link": self.link,
"userid": self.userid
}
class NotificationSwitch(BaseModel):
"""