From 8b4c3cdec957003f5acafcc9e30d04e642f01693 Mon Sep 17 00:00:00 2001 From: ahtlon Date: Thu, 21 May 2026 17:56:17 +0200 Subject: [PATCH] weekday zero index --- app/model/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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):