Description
Tasks need a deadline. Add an optional due_date field so users can set when a task should be completed.
What to do
Acceptance Criteria
POST /tasks/ accepts an optional due_date
GET /tasks/ returns due_date (or null if not set) for every task
- Existing tasks without a
due_date still work fine
Hints
- Import
datetime from Python's standard library
- In Pydantic v2, use
Optional[datetime] = None
- In SQLAlchemy, use
Column(DateTime, nullable=True)
Difficulty
🟢 Beginner — Good First Issue
Description
Tasks need a deadline. Add an optional
due_datefield so users can set when a task should be completed.What to do
due_datecolumn to theTaskmodel inmodels.pyDateTime, nullable, no defaultdue_dateas an optional field toTaskCreateandTaskUpdateschemas"2025-12-31T18:00:00"Optional[datetime] = Nonedue_datein theTaskResponseschemaAcceptance Criteria
POST /tasks/accepts an optionaldue_dateGET /tasks/returnsdue_date(ornullif not set) for every taskdue_datestill work fineHints
datetimefrom Python's standard libraryOptional[datetime] = NoneColumn(DateTime, nullable=True)Difficulty
🟢 Beginner — Good First Issue