from pydantic import BaseModel
from typing import List, Optional
from datetime import datetime, date


class SeasonResponse(BaseModel):
    id: int
    name: str
    start_date: date
    end_date: date
    is_active: bool

    class Config:
        from_attributes = True


class UserStatResponse(BaseModel):
    user_id: int
    total_xp: int
    current_level: int
    restriction_level: int
    penalty_quota_remaining: int
    banned_until: Optional[datetime]

    class Config:
        from_attributes = True


class LeaderboardEntry(BaseModel):
    user_id: int
    username: str  # email or person name
    total_xp: int
    current_level: int

    class Config:
        from_attributes = True