mirror of
https://github.com/dat515-2025/Group-8.git
synced 2026-03-22 15:12:08 +01:00
feat(frontend): improved Dashboard.tsx, added transaction date
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from fastapi_users_db_sqlalchemy import GUID
|
||||
from sqlalchemy import Column, Integer, String, Float, ForeignKey
|
||||
from sqlalchemy import Column, Integer, String, Float, ForeignKey, Date, func
|
||||
from sqlalchemy.orm import relationship
|
||||
from app.core.base import Base
|
||||
from app.models.categories import association_table
|
||||
@@ -10,6 +10,7 @@ class Transaction(Base):
|
||||
id = Column(Integer, primary_key=True, autoincrement=True)
|
||||
amount = Column(Float, nullable=False)
|
||||
description = Column(String(length=255), nullable=True)
|
||||
date = Column(Date, nullable=False, server_default=func.current_date())
|
||||
user_id = Column(GUID, ForeignKey("user.id"), nullable=False)
|
||||
|
||||
# Relationship
|
||||
|
||||
Reference in New Issue
Block a user