21 lines
670 B
Python
21 lines
670 B
Python
|
|
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)
|