Disassembly Order Model (models/disassembly_order.py)

kuaigeyun-mes · riveredge-backend/src/apps/kuaizhizao/models/disassembly_order.py · python · Apache-2.0
automation, pos, tag:manufacturing, tag:bom, tag:disassembly, tag:tortoise-orm, tag:mes

Tortoise ORM models for manufacturing disassembly orders that consume finished goods and produce component inventory per BOM.

# 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 拆卸为组件的库存流程管理。
拆卸:消耗成品库存,增加组件库存。

Author: Luigi Lu
Date: 2026-02-26
"""

from tortoise import fields
from core.models.base import BaseModel


class DisassemblyOrder(BaseModel):
    """
    拆卸单模型

    用于管理拆卸流程:成品按 BOM 拆卸为原材料/半成品。

    Attributes:
        id: 主键ID
        uuid: 业务ID
        tenant_id: 组织ID
        code: 拆卸单号
        warehouse_id: 仓库ID
        warehouse_name: 仓库名称
        disassembly_date: 拆卸日期
        status: 状态(draft/in_progress/completed/cancelled)
        product_material_id: 成品物料ID
        product_material_code: 成品物料编码
        pro

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key