- Backend: FastAPI + Python-SocketIO + SQLAlchemy - Models for categories, questions, game sessions, events - AI services for answer validation and question generation (Claude) - Room management with Redis - Game logic with stealing mechanics - Admin API for question management - Frontend: React + Vite + TypeScript + Tailwind - 5 visual themes (DRRR, Retro, Minimal, RGB, Anime 90s) - Real-time game with Socket.IO - Achievement system - Replay functionality - Sound effects per theme - Docker Compose for deployment - Design documentation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
16 lines
529 B
Python
16 lines
529 B
Python
from sqlalchemy import Column, Integer, String, DateTime
|
|
from sqlalchemy.sql import func
|
|
from app.models.base import Base
|
|
|
|
|
|
class Admin(Base):
|
|
__tablename__ = "admins"
|
|
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
username = Column(String(100), unique=True, nullable=False, index=True)
|
|
password_hash = Column(String(255), nullable=False)
|
|
created_at = Column(DateTime(timezone=True), server_default=func.now())
|
|
|
|
def __repr__(self):
|
|
return f"<Admin(id={self.id}, username='{self.username}')>"
|