Files
opensem/app/Models/Shop/SaleChannel.php
Ludovic CANDELLIER 94a162deb7 fix
2022-01-23 09:02:43 +01:00

27 lines
527 B
PHP

<?php
namespace App\Models\Shop;
use Illuminate\Database\Eloquent\Model;
class SaleChannel extends Model
{
protected $guarded = ['id'];
protected $table = 'shop_sale_channels';
public function deliveries()
{
return $this->hasMany(Delivery::class);
}
public function price_lists()
{
return $this->hasMany(PriceList::class);
}
public function tariffs()
{
return $this->hasManyThrough(Tariff::class, PriceList::class, 'id1', 'tariff_id', 'id2', 'id3')
}
}