Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from typing import Optional
- from datetime import datetime
- from pydantic import BaseModel, ConfigDict
- from app.models.constants import InventoryTimelineType
- from app.schemas.inventory import InventoryProduct
- # Shared properties
- class InventoryTimelineBase(BaseModel):
- inventory_id: Optional[int] = None
- store_id: Optional[int] = None
- added_on: Optional[datetime] = None
- updated_on: Optional[datetime] = None
- source: Optional[str] = None
- category: Optional[int] = None
- changed_value: Optional[float] = None
- change_type: Optional[InventoryTimelineType] = None
- info: Optional[dict] = None
- class InventoryTimelineCreate(InventoryTimelineBase):
- inventory_id: int
- class InventoryTimeline(InventoryTimelineBase):
- inventory: Optional[InventoryProduct] = None
- # Properties shared by models stored in DB
- class InventoryTimelineInDBBase(InventoryTimelineBase):
- model_config = ConfigDict(from_attributes=True)
- id: int
- class InventoryTimelineUpdate(InventoryTimelineBase):
- source: Optional[str] = None
- category: Optional[int] = None
- changed_value: Optional[float] = None
- change_type: Optional[InventoryTimelineType] = None
- info: Optional[dict] = None
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement