Update depreciation_date field type to Date in LineItem model

- Changed the type of the depreciation_date field from Integer to Date in the LineItem model to enhance date accuracy and compliance with SQLAlchemy v2 standards.
This commit is contained in:
2026-03-13 13:37:00 -05:00
parent a74e1d746c
commit 795786a043

View File

@@ -3,10 +3,11 @@ Normalized Database Schema for SCAF (Fixed Assets) and SCAII (Parts Inventory)
SQLAlchemy v2 - Annex 24 Compliance
"""
from datetime import datetime
from typing import Optional, TYPE_CHECKING
from core.database import Base
from decimal import Decimal
from sqlalchemy import Boolean, String, Integer, Numeric, SmallInteger, ForeignKey
from sqlalchemy import Boolean, Date, String, Integer, Numeric, SmallInteger, ForeignKey
from sqlalchemy.orm import Mapped, mapped_column, relationship
from api.v1.common.base_models import TenantScopedMixin, TimestampMixin
from core.database import Base
@@ -177,7 +178,7 @@ class LineItem(Base, TenantScopedMixin, TimestampMixin):
# Dates
depreciation_date: Mapped[Optional[datetime]] = mapped_column(
Integer
Date
) # FECHADEPRECIACION
# Administrative fields