Coverage for app\models.py: 100%
10 statements
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-25 15:02 -0300
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-25 15:02 -0300
1"""Task model."""
3from datetime import datetime
4from typing import Optional
6from sqlmodel import Field, SQLModel
9class Task(SQLModel, table=True):
10 """Tasks class."""
12 id: Optional[int] = Field(default=None, primary_key=True)
13 title: str
14 description: Optional[str] = None
15 created_at: datetime = Field(default_factory=datetime.now())
16 due_date: Optional[datetime] = None
17 completed_at: Optional[datetime] = None