pp-planer/app/Models/ServiceMacroAssignment.php

34 lines
628 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class ServiceMacroAssignment extends Model
{
protected $fillable = [
'service_id',
'part_type',
'macro_id',
'position',
'label_id',
'order',
];
public function service(): BelongsTo
{
return $this->belongsTo(Service::class);
}
public function macro(): BelongsTo
{
return $this->belongsTo(Macro::class);
}
public function label(): BelongsTo
{
return $this->belongsTo(Label::class);
}
}