DKB_parsers/src/schemas/legal_entity.py
Andrey Epifancev 9283ded5ae Initial commit: DKB parsers service
FastAPI service that consumes NATS `files.uploaded` events and parses
uploaded documents from MinIO/S3 into legal entity, company group and
RF office schemas.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-10 18:05:48 +04:00

26 lines
717 B
Python

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)