Automated Action 109d0c91b8 Create FastAPI application with basic CRUD functionality
- Set up project structure with FastAPI app
- Implement items CRUD API endpoints
- Configure SQLite database with SQLAlchemy
- Set up Alembic migrations
- Add health check endpoint
- Enable CORS middleware
- Create README with documentation
2025-06-06 09:44:58 +00:00

21 lines
420 B
Python

from pydantic import BaseModel
from datetime import datetime
from typing import Optional
class ItemBase(BaseModel):
title: str
description: Optional[str] = None
class ItemCreate(ItemBase):
pass
class ItemUpdate(ItemBase):
title: Optional[str] = None
class Item(ItemBase):
id: int
created_at: datetime
updated_at: Optional[datetime] = None
class Config:
from_attributes = True