Files
star-erp/app/Modules/Procurement/Models/ShippingOrderItem.php
sky121113 04f3891275
All checks were successful
Koori-ERP-Deploy-System / deploy-demo (push) Successful in 1m11s
Koori-ERP-Deploy-System / deploy-production (push) Has been skipped
feat: 實作出貨單模組並暫時導向通用製作中頁面,同步優化盤點與調撥功能的活動日誌顯示
2026-02-05 09:33:36 +08:00

36 lines
892 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace App\Modules\Procurement\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ShippingOrderItem extends Model
{
use HasFactory;
protected $fillable = [
'shipping_order_id',
'product_id',
'batch_number',
'quantity',
'unit_price',
'subtotal',
'remark',
];
protected $casts = [
'quantity' => 'decimal:4',
'unit_price' => 'decimal:4',
'subtotal' => 'decimal:2',
];
public function shippingOrder()
{
return $this->belongsTo(ShippingOrder::class);
}
// 注意:在模組化架構下,跨模組關聯應謹慎使用或是直接在 Controller 水和 (Hydration)
// 但為了開發便利,暫時保留對 Product 的關聯(如果 Product 在不同模組,可能無法直接 lazy load
}