forked from admin/services_core
32 lines
566 B
PHP
32 lines
566 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class UserMenuGroup extends Model
|
|
{
|
|
protected $table = 'user_menu_groups';
|
|
|
|
protected $fillable = [
|
|
'user_id',
|
|
'menu_group_id',
|
|
'tenant_id',
|
|
];
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class, 'user_id');
|
|
}
|
|
|
|
public function menuGroup()
|
|
{
|
|
return $this->belongsTo(MenuGroup::class, 'menu_group_id');
|
|
}
|
|
|
|
public function tenant()
|
|
{
|
|
return $this->belongsTo(Tenant::class, 'tenant_id');
|
|
}
|
|
}
|