
Features include: - User management with JWT authentication and role-based access - Inventory items with SKU/barcode tracking and stock management - Categories and suppliers organization - Inventory transactions with automatic stock updates - Low stock alerts and advanced search/filtering - RESTful API with comprehensive CRUD operations - SQLite database with Alembic migrations - Auto-generated API documentation Co-Authored-By: Claude <noreply@anthropic.com>
22 lines
485 B
Python
22 lines
485 B
Python
from pydantic import BaseModel
|
|
from datetime import datetime
|
|
from typing import Optional
|
|
|
|
class CategoryBase(BaseModel):
|
|
name: str
|
|
description: Optional[str] = None
|
|
|
|
class CategoryCreate(CategoryBase):
|
|
pass
|
|
|
|
class CategoryUpdate(BaseModel):
|
|
name: Optional[str] = None
|
|
description: Optional[str] = None
|
|
|
|
class Category(CategoryBase):
|
|
id: int
|
|
created_at: datetime
|
|
updated_at: Optional[datetime] = None
|
|
|
|
class Config:
|
|
from_attributes = True |