Automated Action d340d37ac9 Create Small Business Inventory Management System API
- 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
2025-05-23 11:56:20 +00:00

37 lines
780 B
Python

from pydantic import BaseModel, EmailStr
from typing import Optional
from datetime import datetime
# Shared properties
class SupplierBase(BaseModel):
name: str
contact_name: Optional[str] = None
email: Optional[EmailStr] = None
phone: Optional[str] = None
address: Optional[str] = None
notes: Optional[str] = None
# Properties to receive via API on creation
class SupplierCreate(SupplierBase):
pass
# Properties to receive via API on update
class SupplierUpdate(SupplierBase):
name: Optional[str] = None
class SupplierInDBBase(SupplierBase):
id: str
created_at: datetime
updated_at: datetime
class Config:
from_attributes = True
# Additional properties to return via API
class Supplier(SupplierInDBBase):
pass