15 lines
452 B
PHP
15 lines
452 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class Assignment extends Model
|
|
{
|
|
protected $fillable = ['tenant_id', 'template_id', 'directory_group_id', 'priority'];
|
|
|
|
public function template(): BelongsTo { return $this->belongsTo(Template::class); }
|
|
public function group(): BelongsTo { return $this->belongsTo(DirectoryGroup::class, 'directory_group_id'); }
|
|
}
|