Boilerplate FastAPI & Dockerfile + NGINX

This commit is contained in:
2025-09-22 17:58:16 +01:00
parent f3fbed5298
commit bf600b8e42
35 changed files with 650 additions and 0 deletions

13
app/models/user.py Normal file
View File

@@ -0,0 +1,13 @@
from sqlalchemy.orm import Mapped, mapped_column
from sqlalchemy import String, Boolean
from app.db.session import engine # only for Alembic discovery, not used here
from sqlalchemy.orm import declarative_base
Base = declarative_base()
class User(Base):
__tablename__ = "users"
id: Mapped[int] = mapped_column(primary_key=True, index=True)
email: Mapped[str] = mapped_column(String(254), unique=True, index=True)
hashed_password: Mapped[str | None] = mapped_column(String(255))
role: Mapped[str] = mapped_column(String(32), default="user") # user|admin|auditor
is_active: Mapped[bool] = mapped_column(Boolean, default=True)