2025-07-23 15:41:01 +09:00
|
|
|
<?php
|
|
|
|
|
|
2025-08-21 18:38:27 +09:00
|
|
|
namespace App\Models\Permissions;
|
2025-07-23 15:41:01 +09:00
|
|
|
|
2025-08-21 18:38:27 +09:00
|
|
|
use App\Models\Commons\IdeHelperRoleMenuPermission;
|
|
|
|
|
use App\Models\Commons\Menu;
|
2025-07-23 15:41:01 +09:00
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
2025-08-21 09:50:15 +09:00
|
|
|
/**
|
|
|
|
|
* @mixin IdeHelperRoleMenuPermission
|
|
|
|
|
*/
|
2025-07-23 15:41:01 +09:00
|
|
|
class RoleMenuPermission extends Model
|
|
|
|
|
{
|
|
|
|
|
protected $fillable = [
|
2025-11-06 17:45:49 +09:00
|
|
|
'role_id', 'menu_id', 'access', 'read', 'write', 'export', 'approve',
|
2025-07-23 15:41:01 +09:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
public function role()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(Role::class, 'role_id');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function menu()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(Menu::class, 'menu_id');
|
|
|
|
|
}
|
|
|
|
|
}
|