mirror of
https://github.com/fastapi-practices/fastapi_best_architecture.git
synced 2026-03-13 09:31:31 +08:00
22 lines
541 B
Python
22 lines
541 B
Python
from pydantic import Field
|
|
|
|
from backend.common.schema import SchemaBase
|
|
from backend.plugin.oauth2.enums import UserSocialType
|
|
|
|
|
|
class UserSocialSchemaBase(SchemaBase):
|
|
"""用户社交基础模型"""
|
|
|
|
sid: str = Field(description='第三方用户 ID')
|
|
source: UserSocialType = Field(description='社交平台')
|
|
|
|
|
|
class CreateUserSocialParam(UserSocialSchemaBase):
|
|
"""创建用户社交参数"""
|
|
|
|
user_id: int = Field(description='用户 ID')
|
|
|
|
|
|
class UpdateUserSocialParam(SchemaBase):
|
|
"""更新用户社交参数"""
|