Initial commit: Базовая структура сайта
This commit is contained in:
23
backend/app/schemas/timeline.py
Executable file
23
backend/app/schemas/timeline.py
Executable file
@@ -0,0 +1,23 @@
|
||||
"""
|
||||
Схемы для модуля Хронология
|
||||
"""
|
||||
from pydantic import BaseModel
|
||||
from typing import List
|
||||
|
||||
|
||||
class ActivitySegment(BaseModel):
|
||||
type: str # "Active", "Away", "Productive", "Session Locked", "Power Off"
|
||||
start: str # ISO datetime
|
||||
end: str # ISO datetime
|
||||
|
||||
|
||||
class UserActivity(BaseModel):
|
||||
user_id: int
|
||||
display_name: str
|
||||
segments: List[ActivitySegment]
|
||||
|
||||
|
||||
class TimelineActivityResponse(BaseModel):
|
||||
date: str
|
||||
activities: List[UserActivity]
|
||||
|
||||
Reference in New Issue
Block a user