From 795786a0434ac49d710a7689d9a92a78a7f53487 Mon Sep 17 00:00:00 2001 From: AlexeerCT Date: Fri, 13 Mar 2026 13:37:00 -0500 Subject: [PATCH] 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. --- backend/api/v1/modules/a76/items/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/api/v1/modules/a76/items/models.py b/backend/api/v1/modules/a76/items/models.py index 8d4e1fee..c966c459 100644 --- a/backend/api/v1/modules/a76/items/models.py +++ b/backend/api/v1/modules/a76/items/models.py @@ -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