Files
sam-api/app/Models/Tenants/TenantUserProfile.php
hskwon aa190bf48d fix : 테넌트별 옵션설정 작업
- Tenant Fields
- Tenant Option Groups
- Tenant Option Values
- Tenant Profiles
2025-08-18 19:03:46 +09:00

43 lines
969 B
PHP

<?php
namespace App\Models\Tenants;
use App\Models\Members\User;
use App\Models\Commons\Department;
use Illuminate\Database\Eloquent\Model;
class TenantUserProfile extends Model
{
protected $casts = [
'json_extra' => 'array',
];
protected $fillable = [
'tenant_id',
'user_id',
'department_id',
'position_key',
'job_title_key',
'work_location_key',
'employment_type_key',
'manager_user_id',
'json_extra',
'created_at',
'updated_at',
'profile_photo_path',
'display_name',
];
// 관계: users 테이블은 전역이라 App\Models\User 로 연결
public function user()
{
return $this->belongsTo(User::class, 'user_id');
}
// 조직, 직급 등은 옵션/코드 참조 가능 (필요시 추가)
public function department()
{
return $this->belongsTo(Department::class, 'department_id');
}
}