From bbcb0205fe6a7e6afa580b69f428b71e66edcf59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Fri, 27 Feb 2026 13:46:42 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20[hr]=20=EC=82=AC=EC=97=85=EC=86=8C?= =?UTF-8?q?=EB=93=9D=EC=9E=90=EA=B4=80=EB=A6=AC=20worker=5Ftype=20?= =?UTF-8?q?=EC=BB=AC=EB=9F=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - tenant_user_profiles 테이블에 worker_type 컬럼 추가 (employee/business_income) - TenantUserProfile 모델 fillable에 worker_type 추가 --- app/Models/Tenants/TenantUserProfile.php | 1 + ...ker_type_to_tenant_user_profiles_table.php | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 database/migrations/2026_02_27_000000_add_worker_type_to_tenant_user_profiles_table.php diff --git a/app/Models/Tenants/TenantUserProfile.php b/app/Models/Tenants/TenantUserProfile.php index 4d4763b..12f20c2 100644 --- a/app/Models/Tenants/TenantUserProfile.php +++ b/app/Models/Tenants/TenantUserProfile.php @@ -44,6 +44,7 @@ class TenantUserProfile extends Model 'employee_status', 'manager_user_id', 'json_extra', + 'worker_type', 'profile_photo_path', 'display_name', ]; diff --git a/database/migrations/2026_02_27_000000_add_worker_type_to_tenant_user_profiles_table.php b/database/migrations/2026_02_27_000000_add_worker_type_to_tenant_user_profiles_table.php new file mode 100644 index 0000000..6f8a31e --- /dev/null +++ b/database/migrations/2026_02_27_000000_add_worker_type_to_tenant_user_profiles_table.php @@ -0,0 +1,25 @@ +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'); + }); + } +};