mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-08-25 02:00:13 +08:00
Persist notification clear markers
This commit is contained in:
@@ -7,6 +7,32 @@ from pydantic import BaseModel, Field, field_validator
|
||||
from app.schemas.types import ContentType, NotificationType, MessageChannel
|
||||
|
||||
|
||||
class NotificationClearScope(str, Enum):
|
||||
"""
|
||||
通知中心清理范围。
|
||||
"""
|
||||
|
||||
# 全部消息
|
||||
All = "all"
|
||||
# 系统消息
|
||||
System = "system"
|
||||
# 媒体消息
|
||||
Media = "media"
|
||||
|
||||
|
||||
class NotificationClearBefore(BaseModel):
|
||||
"""
|
||||
通知中心按范围记录的清理时间。
|
||||
"""
|
||||
|
||||
# 全部消息清理时间
|
||||
all: int = 0
|
||||
# 系统消息清理时间
|
||||
system: int = 0
|
||||
# 媒体消息清理时间
|
||||
media: int = 0
|
||||
|
||||
|
||||
class MessageResponse(BaseModel):
|
||||
"""
|
||||
消息发送响应,包含消息ID等信息用于后续编辑
|
||||
|
||||
@@ -267,6 +267,8 @@ class SystemConfigKey(Enum):
|
||||
AIAgentConfig = "AIAgentConfig"
|
||||
# 通知消息格式模板
|
||||
NotificationTemplates = "NotificationTemplates"
|
||||
# 通知中心清理时间
|
||||
NotificationClearBefore = "NotificationClearBefore"
|
||||
# 刮削开关设置
|
||||
ScrapingSwitchs = "ScrapingSwitchs"
|
||||
# 插件安装统计
|
||||
|
||||
Reference in New Issue
Block a user