Files
gh-christianlouis-leagueledger/app/models/user.py
T
Christian Krakau-Louis 0de2eb5830 Implement user authentication and management system with FastAPI
- Added authentication routes for login, registration, password reset, and account deletion in `auth.py`.
- Implemented user profile management, including updating user information and changing passwords.
- Created dashboard views to display user-specific information and recent activity in `dashboard.py`.
- Developed leaderboard views to show team rankings and points in `leaderboard.py`.
- Added QR code generation and redemption functionality in `qr.py` and `redeem.py`.
- Implemented team management features, allowing users to create and join teams in `teams.py`.
- Introduced session debugging utility to assist with session-related issues in `debug_session.py`.
- Configured Docker Compose for MySQL database and FastAPI application with environment variables.
- Updated requirements.txt to include necessary dependencies for the application.
2025-04-11 17:46:59 +02:00

19 lines
549 B
Python

# Add is_admin field to User model if it's missing
from sqlalchemy import Column, Integer, String, Boolean
# ...existing imports...
class User(Base):
__tablename__ = "users"
# ...existing fields...
id = Column(Integer, primary_key=True, index=True)
username = Column(String(50), unique=True, index=True)
email = Column(String(100), unique=True, index=True)
password = Column(String(255))
# Add is_admin field if it doesn't exist
is_admin = Column(Boolean, default=False)
# ...existing methods...