Automated Action 9d9801c0d0 Create FastAPI REST API service
- Add FastAPI application with CORS support
- Implement SQLite database with SQLAlchemy
- Create Item model with CRUD operations
- Setup Alembic for database migrations
- Add comprehensive API endpoints for Items
- Include health check endpoint
- Update README with documentation
2025-06-19 20:27:19 +00:00

12 lines
441 B
Python

from sqlalchemy import Column, Integer, String, DateTime
from sqlalchemy.sql import func
from app.db.base import Base
class Item(Base):
__tablename__ = "items"
id = Column(Integer, primary_key=True, index=True)
name = Column(String, index=True)
description = Column(String)
created_at = Column(DateTime(timezone=True), server_default=func.now())
updated_at = Column(DateTime(timezone=True), onupdate=func.now())