cleaning day
This commit is contained in:
@@ -4,6 +4,9 @@ namespace App\Models\Shop;
|
||||
|
||||
use App\Traits\Model\HasComments;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasManyThrough;
|
||||
use Znck\Eloquent\Traits\BelongsToThrough;
|
||||
|
||||
class PriceList extends Model
|
||||
@@ -14,22 +17,22 @@ class PriceList extends Model
|
||||
|
||||
protected $table = 'shop_price_lists';
|
||||
|
||||
public function tariff()
|
||||
public function tariff(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Tariff::class);
|
||||
}
|
||||
|
||||
public function offers()
|
||||
public function offers(): HasManyThrough
|
||||
{
|
||||
return $this->hasManyThrough(Offer::class, Tariff::class, 'id', 'tariff_id', 'id', 'id');
|
||||
}
|
||||
|
||||
public function sale_channel()
|
||||
public function sale_channel(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(SaleChannel::class);
|
||||
}
|
||||
|
||||
public function price_list_values()
|
||||
public function price_list_values(): HasMany
|
||||
{
|
||||
return $this->hasMany(PriceListValue::class);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user