fix : 테넌트별 옵션설정 작업
- Tenant Fields - Tenant Option Groups - Tenant Option Values - Tenant Profiles
This commit is contained in:
42
app/Models/Tenants/TenantUserProfile.php
Normal file
42
app/Models/Tenants/TenantUserProfile.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user