from __future__ import annotations

from pydantic import BaseModel


class ProductSummary(BaseModel):
    product_code: str
    product_name: str
    material_name: str
    order_qty: int
    unit_weight_kg: float
    gross_material_kg_per_piece: float
    planned_material_weight_kg: float
    suggested_purchase_weight_kg: float
    purchase_multiple_weight_kg: float


class OperationCostLine(BaseModel):
    seq_no: int
    operation_name: str
    work_center: str
    std_labor_cost: float
    std_machine_cost: float
    allowed_scrap_rate: float
    reported_good_qty: int
    reported_scrap_qty: int
    abnormal: bool


class InventoryLotSummary(BaseModel):
    lot_no: str
    item_name: str
    warehouse: str
    location: str
    inbound_weight_kg: float
    remaining_weight_kg: float
    status: str


class MiniAppField(BaseModel):
    field_name: str
    label: str
    required: bool
    description: str


class CostInsight(BaseModel):
    category: str
    amount: float
    ratio: float
    note: str

