Update depreciation_date field type in models and schemas
- Changed the type of the depreciation_date field from Optional[int] to Optional[datetime] in the LineItem model and LineItemBase schema for improved accuracy in date representation. - Updated the frontend interface to reflect the change, altering depreciation_date from number to string to accommodate the new datetime format.
This commit is contained in:
@@ -176,7 +176,7 @@ class LineItem(Base, TenantScopedMixin, TimestampMixin):
|
||||
) # NUMEROGUIA/NUMERODEGUIA
|
||||
|
||||
# Dates
|
||||
depreciation_date: Mapped[Optional[int]] = mapped_column(
|
||||
depreciation_date: Mapped[Optional[datetime]] = mapped_column(
|
||||
Integer
|
||||
) # FECHADEPRECIACION
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ class LineItemBase(BaseModel):
|
||||
guide_number: Optional[str] = Field(None, max_length=50, description="Guide number")
|
||||
|
||||
# Dates
|
||||
depreciation_date: Optional[int] = Field(None, description="Depreciation date")
|
||||
depreciation_date: Optional[datetime] = Field(None, description="Depreciation date")
|
||||
|
||||
# Administrative fields
|
||||
rectification: Optional[int] = Field(None, description="Rectification")
|
||||
|
||||
@@ -192,7 +192,7 @@ export interface Item {
|
||||
reference_number?: string;
|
||||
order?: string;
|
||||
guide_number?: string;
|
||||
depreciation_date?: number;
|
||||
depreciation_date?: string;
|
||||
rectification?: number;
|
||||
warehouse?: string;
|
||||
location?: string;
|
||||
|
||||
Reference in New Issue
Block a user