Automated Action a17fe518a9 Implement Small Business Inventory Management System
This commit includes:
- Project structure setup with FastAPI and SQLite
- Database models and schemas for inventory management
- CRUD operations for all entities
- API endpoints for product, category, supplier, and inventory management
- User authentication with JWT tokens
- Initial database migration
- Comprehensive README with setup instructions
2025-06-17 19:02:35 +00:00

37 lines
683 B
Python

from typing import Optional
from pydantic import BaseModel
# Shared properties
class CategoryBase(BaseModel):
name: Optional[str] = None
description: Optional[str] = None
# Properties to receive on category creation
class CategoryCreate(CategoryBase):
name: str
# Properties to receive on category update
class CategoryUpdate(CategoryBase):
pass
# Properties shared by models in DB
class CategoryInDBBase(CategoryBase):
id: int
name: str
class Config:
from_attributes = True
# Properties to return to client
class Category(CategoryInDBBase):
pass
# Properties properties stored in DB
class CategoryInDB(CategoryInDBBase):
pass