fix : _ide_helper.php 헬퍼 추가

- 개발 보조 기능
This commit is contained in:
2025-08-21 09:50:15 +09:00
parent 05745ee338
commit 3707b53ffc
53 changed files with 455 additions and 56 deletions

View File

@@ -15,6 +15,9 @@
use Spatie\Permission\Models\Role as SpatieRole;
use App\Models\Commons\Role as CommonRole;
/**
* @mixin IdeHelperUser
*/
class User extends Authenticatable
{
use HasApiTokens, Notifiable, SoftDeletes, ModelTrait, HasRoles;
@@ -60,12 +63,6 @@ public function userRoles()
return $this->hasMany(UserRole::class);
}
public function orgRoles()
{
return $this->belongsToMany(CommonRole::class, 'user_roles')
->withPivot(['tenant_id', 'assigned_at']);
}
public function userTenantById($tenantId)
{
return $this->hasOne(UserTenant::class)->where('tenant_id', $tenantId);