feat: [hr] 사업소득자관리 worker_type 컬럼 추가
- tenant_user_profiles 테이블에 worker_type 컬럼 추가 (employee/business_income) - TenantUserProfile 모델 fillable에 worker_type 추가
This commit is contained in:
@@ -44,6 +44,7 @@ class TenantUserProfile extends Model
|
||||
'employee_status',
|
||||
'manager_user_id',
|
||||
'json_extra',
|
||||
'worker_type',
|
||||
'profile_photo_path',
|
||||
'display_name',
|
||||
];
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user