Coverage for app\models.py: 100%

10 statements  

« prev     ^ index     » next       coverage.py v7.6.1, created at 2024-09-25 15:02 -0300

1"""Task model.""" 

2 

3from datetime import datetime 

4from typing import Optional 

5 

6from sqlmodel import Field, SQLModel 

7 

8 

9class Task(SQLModel, table=True): 

10 """Tasks class.""" 

11 

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