This commit is contained in:
jxxghp
2024-07-04 07:13:49 +08:00
parent dde2d22d93
commit 5f01dd5625
14 changed files with 51 additions and 19 deletions
+14
View File
@@ -2,6 +2,8 @@ from typing import Optional
from pydantic import BaseModel
from app.schemas import NotificationType
class MediaServerConf(BaseModel):
"""
@@ -15,6 +17,8 @@ class MediaServerConf(BaseModel):
config: Optional[dict] = {}
# 是否启用
enabled: Optional[bool] = False
# 同步媒体体库列表
sync_libraries: Optional[list] = []
class DownloaderConf(BaseModel):
@@ -49,6 +53,16 @@ class NotificationConf(BaseModel):
enabled: Optional[bool] = False
class NotificationSwitchConf(BaseModel):
"""
通知场景开关配置
"""
# 场景名称
type: NotificationType = None
# 通知范围 all/user/admin/userandadmin
action: Optional[str] = 'all'
class StorageConf(BaseModel):
"""
存储配置
+2
View File
@@ -64,6 +64,8 @@ class SystemConfigKey(Enum):
MediaServers = "MediaServers"
# 消息通知配置
Notifications = "Notifications"
# 通知场景开关设置
NotificationSwitchs = "NotificationSwitchs"
# 目录配置
Directories = "Directories"
# 存储配置