24 lines
505 B
PHP
24 lines
505 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Relations\Pivot;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class StoreProductSku extends Pivot
|
|
{
|
|
protected $table = 'store_product_skus';
|
|
|
|
protected $fillable = ['amount', 'product_sku_id', 'status', 'store_id'];
|
|
|
|
public function store()
|
|
{
|
|
return $this->belongsTo(Store::class, 'store_id');
|
|
}
|
|
|
|
public function productSku()
|
|
{
|
|
return $this->belongsTo(ProductSku::class, 'product_sku_id');
|
|
}
|
|
}
|