Files
homeschool/backend/app/schemas/subject.py
derekc f645d78c83 Add Meeting system subject and notification system
- Auto-create a locked "Meeting" subject for every user on registration
  and seed it for all existing users on startup
- Meeting subject cannot be deleted or renamed (is_system flag)
- 5-minute corner toast warning on Dashboard and TV with live countdown,
  dismiss button, and 1-minute re-notify if dismissed
- At start time: full-screen TV overlay with 30-second auto-dismiss,
  automatic pause of running block, switch to Meeting block, and
  auto-start of Meeting timer
- Web Audio API chimes: rising on warnings, falling at meeting start
- Update README with Meeting subject and notification system docs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 23:44:21 -08:00

44 lines
780 B
Python

from pydantic import BaseModel
class SubjectOptionCreate(BaseModel):
text: str
order_index: int = 0
class SubjectOptionUpdate(BaseModel):
text: str | None = None
class SubjectOptionOut(BaseModel):
id: int
text: str
order_index: int
model_config = {"from_attributes": True}
class SubjectCreate(BaseModel):
name: str
color: str = "#10B981"
icon: str = "📚"
class SubjectUpdate(BaseModel):
name: str | None = None
color: str | None = None
icon: str | None = None
is_active: bool | None = None
class SubjectOut(BaseModel):
id: int
name: str
color: str
icon: str
is_active: bool
is_system: bool = False
options: list[SubjectOptionOut] = []
model_config = {"from_attributes": True}