feat : Tenant Scope 추가 - 모델에 해당 유저의 tenant_id 로 자동 매핑 (CommonCode 모델에 추가)

This commit is contained in:
2025-07-25 17:31:08 +09:00
parent 201df48853
commit 94501d5624
5 changed files with 58 additions and 6 deletions

View File

@@ -42,4 +42,9 @@ public function company()
return $this->belongsTo(MemberCompany::class, 'tn_num', 'mc_num');
// members.tn_num = member_company.mc_num
}
public function tenant()
{
return $this->belongsTo(Tenant::class, 'tn_num');
}
}