refactor(backend): refactor project, add database migrations support

This commit is contained in:
2025-09-24 19:42:04 +02:00
parent b880670929
commit 3c8ad5f74f
33 changed files with 408 additions and 77 deletions

2
backend/app/models/.keep Normal file
View File

@@ -0,0 +1,2 @@
# SQLAlchemy modely

View File

View File

@@ -0,0 +1,9 @@
from sqlalchemy import Column, Integer, String, Float
from ..core.db import Base
class Transaction(Base):
__tablename__ = "transaction"
id = Column(Integer, primary_key=True, autoincrement=True)
amount = Column(Float, nullable=False)
description = Column(String(length=255), nullable=True)

View File

@@ -0,0 +1,7 @@
from sqlalchemy import Column, String
from fastapi_users.db import SQLAlchemyBaseUserTableUUID
from ..core.base import Base # Import Base z base.py
class User(SQLAlchemyBaseUserTableUUID, Base):
first_name = Column(String(length=100), nullable=True)
last_name = Column(String(length=100), nullable=True)