from pydantic import BaseModel, ConfigDict, Field import uuid from datetime import datetime, date from .enums import LegalEntityType class LegalEntityPostRequest(BaseModel): inn: str = Field(min_length=10, max_length=12, pattern=r'^\d+$') entity_type: LegalEntityType | None name: str company_group_id: uuid.UUID regional_office_id: uuid.UUID close_date: date updated_by: str class LegalEntityPostResponse(BaseModel): id: uuid.UUID inn: str entity_type: LegalEntityType | None name: str company_group_id: uuid.UUID regional_office_id: uuid.UUID close_date: date updated_by: str created_at: datetime model_config = ConfigDict(from_attributes=True)