23 lines
681 B
Python
23 lines
681 B
Python
from typing import List, Optional, Literal
|
|
from pydantic import Field
|
|
from app.schemas.pl.quota_cert import InputBody
|
|
|
|
|
|
class LegalDocumentProduct(InputBody):
|
|
id: str = Field(min_length=1, max_length=64)
|
|
legal_use_cert_url: Optional[str] = Field(None, max_length=2000)
|
|
|
|
|
|
class LegalDocumentsBody(InputBody):
|
|
products: Optional[List[LegalDocumentProduct]] = None
|
|
|
|
|
|
class StopLegalDocument(InputBody):
|
|
stop_type: Literal['load', 'delivery']
|
|
stop_product_id: str = Field(min_length=1, max_length=64)
|
|
legal_use_cert_url: Optional[str] = Field(None, max_length=2000)
|
|
|
|
|
|
class StopLegalDocumentsBody(InputBody):
|
|
items: Optional[List[StopLegalDocument]] = None
|