feat: [hr] 사업소득자관리 worker_type 컬럼 추가

- tenant_user_profiles 테이블에 worker_type 컬럼 추가 (employee/business_income)
- TenantUserProfile 모델 fillable에 worker_type 추가
This commit is contained in:
김보곤
2026-02-27 13:46:42 +09:00
parent 9bf0cc8df2
commit bbcb0205fe
2 changed files with 26 additions and 0 deletions

View File

@@ -44,6 +44,7 @@ class TenantUserProfile extends Model
'employee_status', 'employee_status',
'manager_user_id', 'manager_user_id',
'json_extra', 'json_extra',
'worker_type',
'profile_photo_path', 'profile_photo_path',
'display_name', 'display_name',
]; ];

View File

@@ -0,0 +1,25 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('tenant_user_profiles', function (Blueprint $table) {
$table->string('worker_type', 20)->default('employee')->after('employee_status')
->comment('근로자유형: employee(사원), business_income(사업소득자)');
$table->index(['tenant_id', 'worker_type'], 'idx_tenant_worker_type');
});
}
public function down(): void
{
Schema::table('tenant_user_profiles', function (Blueprint $table) {
$table->dropIndex('idx_tenant_worker_type');
$table->dropColumn('worker_type');
});
}
};