fix : BOM구성 API, DB 작업
- product_components 컬럼 변경 - BOM 구성, 카테고리리스트, BOM트리(재귀)호출 API 개발
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Models\Products;
|
||||
|
||||
use App\Models\Materials\Material;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Traits\ModelTrait;
|
||||
@@ -16,12 +17,12 @@ class ProductComponent extends Model
|
||||
protected $fillable = [
|
||||
'tenant_id',
|
||||
'parent_product_id',
|
||||
'category_id',
|
||||
'category_name',
|
||||
'ref_type',
|
||||
'child_product_id',
|
||||
'material_id',
|
||||
'ref_id',
|
||||
'quantity',
|
||||
'sort_order',
|
||||
'is_default',
|
||||
'created_by',
|
||||
'updated_by',
|
||||
];
|
||||
@@ -60,7 +61,7 @@ public function childProduct()
|
||||
*/
|
||||
public function material()
|
||||
{
|
||||
return $this->belongsTo(\App\Models\Materials\Material::class, 'material_id');
|
||||
return $this->belongsTo(Material::class, 'material_id');
|
||||
}
|
||||
|
||||
// ---------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user