Files
geMoldInsight/src/api/inventory/schemas/stock_movement_schemas.py
T

28 lines
583 B
Python
Raw Normal View History

2026-03-08 22:58:25 +08:00
from pydantic import BaseModel
from typing import Optional
from datetime import datetime
class StockMovementCreate(BaseModel):
product_id: int
warehouse_id: int
movement_type: str
quantity: int
unit_price: Optional[float] = None
remark: Optional[str] = None
class StockMovementResponse(BaseModel):
id: int
product_name: str
movement_type: str
quantity: int
before_quantity: int
after_quantity: int
reference_no: Optional[str]
remark: Optional[str]
created_at: datetime
class Config:
from_attributes = True