Files
shanxia2.0/backend/app/schemas/pl/quota_scope.py
T

27 lines
1023 B
Python

"""合同用证范围;集合遗漏保持,显式空集合申请移除。"""
from typing import List, Literal, Optional
from pydantic import Field
from app.schemas.pl.quota_cert import InputBody
class ScopeProductBody(InputBody):
id: Optional[str] = Field(None, max_length=64)
contract_product_id: str = Field(min_length=1, max_length=64)
scope_status: Optional[Literal['active', 'inactive']] = None
remark: Optional[str] = Field(None, max_length=1000)
order_num: Optional[int] = None
class ContractCertBindingBody(InputBody):
id: Optional[str] = Field(None, max_length=64)
cert_type: Literal['purchase', 'transport']
cert_id: str = Field(min_length=1, max_length=64)
link_status: Optional[Literal['active', 'inactive']] = None
products: Optional[List[ScopeProductBody]] = None
remark: Optional[str] = Field(None, max_length=1000)
order_num: Optional[int] = None
class ContractCertBindingsBody(InputBody):
bindings: Optional[List[ContractCertBindingBody]] = None