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

25
app/Models/UserTenant.php Normal file
View File

@@ -0,0 +1,25 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class UserTenant extends Model
{
use SoftDeletes;
protected $fillable = [
'user_id', 'tenant_id', 'is_active', 'joined_at', 'left_at'
];
public function user()
{
return $this->belongsTo(User::class);
}
public function tenant()
{
return $this->belongsTo(Tenant::class);
}
}