Initial project scaffold
Full-stack homeschool web app with FastAPI backend, Vue 3 frontend, MySQL database, and Docker Compose orchestration. Includes JWT auth, WebSocket real-time TV dashboard, schedule builder, activity logging, and multi-child support. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
46
backend/app/schemas/schedule.py
Normal file
46
backend/app/schemas/schedule.py
Normal file
@@ -0,0 +1,46 @@
|
||||
from datetime import time
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class ScheduleBlockCreate(BaseModel):
|
||||
subject_id: int | None = None
|
||||
time_start: time
|
||||
time_end: time
|
||||
label: str | None = None
|
||||
notes: str | None = None
|
||||
order_index: int = 0
|
||||
|
||||
|
||||
class ScheduleBlockOut(BaseModel):
|
||||
id: int
|
||||
subject_id: int | None
|
||||
time_start: time
|
||||
time_end: time
|
||||
label: str | None
|
||||
notes: str | None
|
||||
order_index: int
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
|
||||
class ScheduleTemplateCreate(BaseModel):
|
||||
name: str
|
||||
child_id: int | None = None
|
||||
is_default: bool = False
|
||||
blocks: list[ScheduleBlockCreate] = []
|
||||
|
||||
|
||||
class ScheduleTemplateUpdate(BaseModel):
|
||||
name: str | None = None
|
||||
child_id: int | None = None
|
||||
is_default: bool | None = None
|
||||
|
||||
|
||||
class ScheduleTemplateOut(BaseModel):
|
||||
id: int
|
||||
name: str
|
||||
child_id: int | None
|
||||
is_default: bool
|
||||
blocks: list[ScheduleBlockOut] = []
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
Reference in New Issue
Block a user