Automated Action 609e7fb237 Implement retail management and payment API with FastAPI
This API provides endpoints for:
- Product and inventory management
- Customer management
- Order processing
- Payment processing with Stripe integration
- User authentication

generated with BackendIM... (backend.im)
2025-05-12 12:00:19 +00:00

39 lines
731 B
Python

from typing import Optional
from pydantic import BaseModel
class ProductBase(BaseModel):
name: str
description: Optional[str] = None
sku: str
price: float
image_url: Optional[str] = None
is_active: bool = True
class ProductCreate(ProductBase):
pass
class ProductUpdate(BaseModel):
name: Optional[str] = None
description: Optional[str] = None
sku: Optional[str] = None
price: Optional[float] = None
image_url: Optional[str] = None
is_active: Optional[bool] = None
class ProductInDBBase(ProductBase):
id: int
class Config:
orm_mode = True
class Product(ProductInDBBase):
pass
class ProductWithInventory(Product):
inventory_quantity: int = 0