merge main
This commit is contained in:
@@ -1,29 +1,17 @@
|
||||
from enum import Enum
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from app.enums.generation_status import (
|
||||
GenerationStatus,
|
||||
GenerationType,
|
||||
DURATIONS,
|
||||
ASPECT_RATIOS,
|
||||
RESOLUTIONS,
|
||||
IMAGE_SIZES,
|
||||
)
|
||||
from app.schemas.common import NaiveDatetime, NaiveDatetimeOptional
|
||||
from app.services.operation_log import log_operation
|
||||
|
||||
|
||||
class GenerationStatus(str, Enum):
|
||||
prompt_optimized = "prompt_optimized"
|
||||
generating = "generating"
|
||||
completed = "completed"
|
||||
failed = "failed"
|
||||
|
||||
|
||||
class GenerationType(str, Enum):
|
||||
video = "video"
|
||||
image = "image"
|
||||
|
||||
|
||||
DURATIONS = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
|
||||
ASPECT_RATIOS = ["16:9", "9:16", "1:1", "4:3", "3:4", "21:9"]
|
||||
RESOLUTIONS = ["480p", "720p", "1080p"]
|
||||
IMAGE_SIZES = ["2K", "4K"]
|
||||
|
||||
|
||||
class OptimizeParams(BaseModel):
|
||||
project_id: str
|
||||
prompt: str = Field(..., max_length=500)
|
||||
|
||||
@@ -1,13 +1,6 @@
|
||||
from enum import Enum
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class SmsScene(str, Enum):
|
||||
register = "register"
|
||||
login = "login"
|
||||
common = "common"
|
||||
set_password = "set_password"
|
||||
from app.enums.sms import SmsScene
|
||||
|
||||
|
||||
class SmsSendRequest(BaseModel):
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
from datetime import datetime
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class UserOAuthAccountOut(BaseModel):
|
||||
id: str = Field(..., description="主键")
|
||||
oauth_id: str = Field(..., description="授权表中的id")
|
||||
advertiser_id: Optional[str] = Field(None, description="广告主账户id")
|
||||
advertiser_name: Optional[str] = Field(None, description="广告账户名")
|
||||
advertiser_role: Optional[str] = Field(None, description="广告账户类型")
|
||||
created_at: datetime = Field(..., description="创建时间")
|
||||
updated_at: datetime = Field(..., description="更新时间")
|
||||
|
||||
|
||||
class PaginationInfo(BaseModel):
|
||||
page: int = Field(..., description="当前页码")
|
||||
page_size: int = Field(..., description="每页数量")
|
||||
total: int = Field(..., description="总记录数")
|
||||
total_pages: int = Field(..., description="总页数")
|
||||
|
||||
|
||||
class OAuthAccountListResponse(BaseModel):
|
||||
code: int = Field(0, description="返回码,0表示成功")
|
||||
message: str = Field("查询成功", description="返回消息")
|
||||
data: List[UserOAuthAccountOut] = Field(..., description="授权账户列表数据")
|
||||
pagination: PaginationInfo = Field(..., description="分页信息")
|
||||
|
||||
|
||||
class DeleteOAuthAccountRequest(BaseModel):
|
||||
id: str = Field(..., description="授权账户表id")
|
||||
Reference in New Issue
Block a user