User
The User model represents student and admin accounts in the system. Table name:users
Fields
Primary key, auto-incrementing
User’s full name (indexed)
Unique email address (indexed)
Academic year level
Math class identifier
Hashed password using Werkzeug security
Administrative privileges flag
Educational key stage (indexed)
Foreign key to
school.id (indexed, nullable)Competition participation flag
Relationships
Methods
generate_password_hashParameters:password(str): Plain text password to hash
check_password_hashParameters:password(str): Plain text password to verify
bool: True if password matches, False otherwise
Mixins
Inherits fromUserMixin (Flask-Login) and db.Model
School
The School model represents educational institutions. Table name:school
Fields
Primary key, auto-incrementing
School name (unique, indexed)
Email domain for school addresses
Physical address
Timestamp when school joined the platform