43 lines
1.1 KiB
Python

from datetime import datetime
from decimal import Decimal
from typing import Literal
from uuid import UUID
from pydantic import BaseModel
from src.schemas.enums import PeriodQuarter
class OsvGroupEntryResponse(BaseModel):
"""Строка get_osv_entries_for_group; денежные суммы в JSON — точные строки."""
osv_entry_id: UUID
recognition_job_id: UUID
legal_entity_id: UUID
stored_file_id: UUID
account_code: str | None
account_id: UUID | None
account_root: str
counterparty_name: str
counterparty_inn: str
counterparty_id: UUID | None
opening_debit: Decimal
opening_credit: Decimal
turnover_debit: Decimal
turnover_credit: Decimal
closing_debit: Decimal
closing_credit: Decimal
legal_entity_name: str
company_group_id: UUID
company_group_name: str
original_name: str
file_status: str
period_year: int
period_quarter: PeriodQuarter
uploaded_at: datetime | None
uploaded_by: str | None
finished_at: datetime | None
is_gsk: bool
is_gk: bool
entity_group_flag: Literal['ГСК', 'ГК', 'Внешний']