Automated Action 993e1df71e Create REST API service with FastAPI and SQLite
- Set up project structure with app modules
- Configure SQLite database connection
- Set up Alembic for database migrations
- Implement Item model with CRUD operations
- Create API endpoints for items management
- Add health check endpoint
- Add API documentation
- Add comprehensive README
2025-05-19 15:58:21 +00:00

17 lines
550 B
Python

"""
Database model for items.
"""
from sqlalchemy import Column, Integer, String, Boolean, DateTime
from sqlalchemy.sql import func
from app.db.base_class import Base
class Item(Base):
"""Item model for storing item data."""
id = Column(Integer, primary_key=True, index=True)
title = Column(String, index=True)
description = Column(String)
is_active = Column(Boolean, default=True)
created_at = Column(DateTime(timezone=True), server_default=func.now())
updated_at = Column(DateTime(timezone=True), onupdate=func.now())