eksplicit mapping af envs
This commit is contained in:
20
backend/app/models/db_models.py
Normal file
20
backend/app/models/db_models.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from app.core.database import Base
|
||||
|
||||
|
||||
class DailyStat(Base):
|
||||
__tablename__ = "daily_stats"
|
||||
|
||||
date: Mapped[sa.Date] = mapped_column(sa.Date, primary_key=True)
|
||||
total_sessions: Mapped[int] = mapped_column(sa.Integer, default=0)
|
||||
total_matches: Mapped[int] = mapped_column(sa.Integer, default=0)
|
||||
|
||||
|
||||
class InterestCategoryCount(Base):
|
||||
__tablename__ = "interest_category_counts"
|
||||
|
||||
date: Mapped[sa.Date] = mapped_column(sa.Date, primary_key=True)
|
||||
category: Mapped[str] = mapped_column(sa.String(64), primary_key=True)
|
||||
count: Mapped[int] = mapped_column(sa.Integer, default=0)
|
||||
Reference in New Issue
Block a user