
- Set up project structure with FastAPI and SQLite - Create database models for inventory management - Set up SQLAlchemy and Alembic for database migrations - Create initial database migrations - Implement CRUD operations for products, categories, suppliers - Implement stock movement tracking and inventory management - Add authentication and user management - Add API endpoints for all entities - Add health check endpoint - Update README with project information and usage instructions
12 lines
472 B
Python
12 lines
472 B
Python
from sqlalchemy import Column, String, DateTime, Text
|
|
from sqlalchemy.sql import func
|
|
|
|
from app.db.base_class import Base
|
|
|
|
|
|
class Category(Base):
|
|
id = Column(String, primary_key=True, index=True)
|
|
name = Column(String, index=True, nullable=False)
|
|
description = Column(Text, nullable=True)
|
|
created_at = Column(DateTime(timezone=True), server_default=func.now())
|
|
updated_at = Column(DateTime(timezone=True), server_default=func.now(), onupdate=func.now()) |