diff --git a/app/model/models.py b/app/model/models.py index ea0c80e..b465640 100644 --- a/app/model/models.py +++ b/app/model/models.py @@ -1,5 +1,6 @@ from sqlmodel import Field, Relationship, Session, SQLModel from typing import List +from datetime import time class Base(SQLModel): pass @@ -88,8 +89,8 @@ class Card(Base, table=True): group: GroupDB | None = Relationship(back_populates="cards") class TimetableBase(Base): - weekday: int = Field(le=7, ge=1) - starttime: str + weekday: int = Field(le=6, ge=0) + starttime: time duration: int = Field(gt=0, lt=1440) class Timetable(TimetableBase, table=True):