fix : 테이블 추가 및 수정

- 신규 (user_roles, user_tenants)
- 수정 (roles, tenants, users)
This commit is contained in:
2025-07-26 01:23:02 +09:00
parent 94501d5624
commit f5534e437b
10 changed files with 276 additions and 24 deletions

View File

@@ -42,4 +42,24 @@ public function subscription()
{
return $this->belongsTo(Subscription::class, 'subscription_id');
}
public function userTenants()
{
return $this->hasMany(UserTenant::class);
}
public function users()
{
return $this->belongsToMany(User::class, 'user_tenants');
}
public function roles()
{
return $this->hasMany(Role::class);
}
public function userRoles()
{
return $this->hasMany(UserRole::class);
}
}