29 lines
1.2 KiB
Python
29 lines
1.2 KiB
Python
from datetime import datetime
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class RequestOAuthRequest(BaseModel):
|
|
oauth_type: int = Field(
|
|
...,
|
|
description="开户方式(1=巨量广告,2=巨量千川,3=快手,4=腾讯)",
|
|
)
|
|
|
|
|
|
class RequestOAuthResponse(BaseModel):
|
|
auth_url: str = Field(..., description="第三方授权链接")
|
|
|
|
|
|
class UserOAuthOut(BaseModel):
|
|
id: str = Field(..., description="主键")
|
|
account_id: str = Field(..., description="授权账户id")
|
|
account_name: str = Field(..., description="授权账户name")
|
|
account_role: str | None = Field(None, description="授权账户角色")
|
|
account_username: str | None = Field(None, description="授权账户登录账号")
|
|
user_id: str = Field(..., description="用户id")
|
|
open_type: int = Field(..., description="开户方式")
|
|
port_type: int = Field(..., description="平台端口")
|
|
appid: str | None = Field(None, description="授权应用id")
|
|
material_auth_status: bool = Field(False, description="是否敏感物料授权")
|
|
created_at: datetime = Field(..., description="创建时间")
|
|
updated_at: datetime = Field(..., description="更新时间") |