up
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -109,3 +109,37 @@ class SensitiveWordAddReq(BaseModel):
|
||||
"""添加敏感词(11.31)"""
|
||||
|
||||
word: str = Field(min_length=1, max_length=50)
|
||||
|
||||
|
||||
class AdminPasswordChangeReq(BaseModel):
|
||||
"""管理员修改密码(11.35)"""
|
||||
|
||||
old_password: str = Field(min_length=1, max_length=100)
|
||||
new_password: str = Field(min_length=6, max_length=100)
|
||||
|
||||
|
||||
class AdminVideoCreateReq(BaseModel):
|
||||
"""管理后台新增视频(11.36)
|
||||
|
||||
两种模式二选一:
|
||||
- upload_token + cover_upload_token:先通过 /admin/videos/upload 获取上传凭证,
|
||||
前端直传到 server/uploads 后把 token 传回(视频自动转码)
|
||||
- video_url + cover_url:直接填 m3u8 地址(适合 CDN 外站 / 已经转码好的资源)
|
||||
"""
|
||||
|
||||
title: str = Field(min_length=1, max_length=100)
|
||||
description: str = Field(max_length=500, default="")
|
||||
category_id: int = Field(ge=1)
|
||||
tag_names: list[str] | None = Field(None)
|
||||
|
||||
# 模式 A:先上传再发布(token 方式)
|
||||
upload_token: str | None = None
|
||||
cover_upload_token: str | None = None # 可选
|
||||
|
||||
# 模式 B:直接填 URL(m3u8 外站)
|
||||
video_url: str | None = Field(None, max_length=500)
|
||||
cover_url: str | None = Field(None, max_length=500)
|
||||
duration: int | None = Field(None, ge=1, le=36000) # 秒,可选
|
||||
|
||||
# 发布状态:默认待审核(1),也可直接发布(2)
|
||||
status: int = Field(1, ge=1, le=2)
|
||||
|
||||
Reference in New Issue
Block a user