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

18 lines
481 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, min_length=0, max_length=1000)
due_date: date = Field(None)
status: str = Field('pending', regex='^(pending|completed)$')
class TaskResponse(BaseModel):
id: int
title: str
description: str
due_date: date
status: str
class Config:
from_attributes = True