Defines data structures for Bill of Materials expansion and material requirement calculations. Use these schemas for validating and serializing manufacturing cost and requirement data.
# Source: https://github.com/kuaigeyun/kuaigeyun-mes | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
"""
BOM计算相关schema
提供BOM展开和物料需求计算相关的数据验证和序列化。
注意:BOM管理已移至master_data APP,本文件只保留计算相关的schema。
Author: Luigi Lu
Date: 2025-01-01
"""
from typing import Optional, List
from pydantic import Field
from core.schemas.base import BaseSchema
# === BOM展开结果 ===
class BOMExpansionItem(BaseSchema):
"""BOM展开结果项"""
level: int = Field(..., description="层级")
component_id: int = Field(..., description="物料ID")
component_code: str = Field(..., description="物料编码")
component_name: str = Field(..., description="物料名称")
component_type: str = Field(..., description="物料类型")
req
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key