Роли, переделывание отчета, изменение на главной странице

This commit is contained in:
brusnitsyn
2026-01-11 23:37:18 +09:00
parent eb019504d7
commit d4f077cdaf
59 changed files with 2099 additions and 366 deletions

30
app/Models/UserRole.php Normal file
View File

@@ -0,0 +1,30 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class UserRole extends Model
{
public $timestamps = false;
protected $primaryKey = 'user_role_id';
protected $fillable = [
'rf_user_id',
'rf_role_id',
'is_active',
'is_default',
];
public function user(): BelongsTo
{
return $this->belongsTo(User::class, 'rf_user_id', 'id');
}
public function role(): BelongsTo
{
return $this->belongsTo(Role::class, 'rf_role_id', 'role_id');
}
}