Files
agentic-studio/zipit/loop_runs/v7_enum_fix/schemas.py
2026-04-12 18:48:14 +03:00

18 lines
464 B
Python

from pydantic import BaseModel, Field
from datetime import date
class TaskCreate(BaseModel):
title: str = Field(..., min_length=1, max_length=255)
description: str = Field(None, max_length=1000)
due_date: date = Field(...)
status: str = Field("pending", min_length=1, max_length=20)
class TaskResponse(BaseModel):
id: int
title: str
description: str
due_date: date
status: str
class Config:
from_attributes = True