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

@@ -2,11 +2,15 @@
namespace App\Models\Commons;
use App\Models\Members\User;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use App\Traits\BelongsToTenant;
use App\Traits\ModelTrait;
/**
* @mixin IdeHelperDepartment
*/
class Department extends Model
{
use SoftDeletes, BelongsToTenant, ModelTrait;
@@ -33,7 +37,7 @@ public function departmentUsers()
public function users()
{
// User 네임스페이스가 다르면 여기만 맞춰줘.
return $this->belongsToMany(\App\Models\User::class, 'department_user', 'department_id', 'user_id')
return $this->belongsToMany(User::class, 'department_user', 'department_id', 'user_id')
->withPivot(['tenant_id','is_primary','joined_at','left_at','created_at','updated_at','deleted_at'])
->withTimestamps();
}