from datetime import date, datetime
from typing import Any, Dict, Optional
from uuid import UUID, uuid4

from pydantic.class_validators import root_validator
from sqlmodel import Column, Enum, Field, SQLModel
from sqlmodel.sql.sqltypes import GUID

from ...utils.date import now_datetime
from ..constants import OperationType, PaymentType, SaleType


class BaseBalance(SQLModel):
    value: float = Field(description="Value of operation")
    operation: OperationType = Field(
        description="Type of operation", sa_column=Column(