átlagos kiegészítséek jó sok
This commit is contained in:
36
backend/app/schemas/gamification.py
Normal file
36
backend/app/schemas/gamification.py
Normal file
@@ -0,0 +1,36 @@
|
||||
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
|
||||
Reference in New Issue
Block a user