dingdanquanliucheng/backend/app/schemas/suppliers.py
taiyi 9b32afdbb4 为后端全部 86 个 Python 文件添加中文注释
覆盖所有模块:
- api 层:17 个路由文件,每个接口标注用途、参数、返回值、权限
- services 层:18 个服务文件,每个方法标注作用、参数、返回值、调用方
- repositories 层:13 个仓储文件,每个方法标注查询逻辑和被调用方
- schemas 层:11 个请求/响应体文件,每个字段标注业务含义
- core 层:config、security、exceptions、responses、error_codes
- models 层:19 个 ORM 模型类,每个表标注业务含义和关联关系
- scripts:bootstrap_data、smoke_check
- migrations:env.py 和版本迁移文件

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 07:23:33 +08:00

65 lines
1.4 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""
供应商模块请求模型
定义供应商管理相关的请求体数据模型,供 suppliers 路由使用。
包含供应商的创建和更新操作。
"""
from pydantic import BaseModel
class CreateSupplierRequest(BaseModel):
"""创建供应商请求体。被 POST /api/suppliers 路由使用。"""
supplier_name: str
"""供应商名称"""
supplier_type: str
"""供应商类型(如原材料供应商、物流供应商等)"""
contact_name: str | None = None
"""联系人姓名"""
contact_mobile: str | None = None
"""联系人电话"""
address: str | None = None
"""供应商地址"""
template_type: str | None = None
"""对账模板类型"""
status: int = 1
"""状态1-启用0-禁用"""
remark: str | None = None
"""备注信息"""
class UpdateSupplierRequest(BaseModel):
"""更新供应商请求体。被 PUT /api/suppliers/{id} 路由使用。"""
supplier_name: str
"""供应商名称"""
supplier_type: str
"""供应商类型"""
contact_name: str | None = None
"""联系人姓名"""
contact_mobile: str | None = None
"""联系人电话"""
address: str | None = None
"""供应商地址"""
template_type: str | None = None
"""对账模板类型"""
status: int = 1
"""状态1-启用0-禁用"""
remark: str | None = None
"""备注信息"""