From 08b07c724aaf23bee6602a6a5435c5b79371e84f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Thu, 26 Feb 2026 20:56:41 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20[attendance]=20attendance=5Frequests=20?= =?UTF-8?q?=ED=85=8C=EC=9D=B4=EB=B8=94=20=EB=A7=88=EC=9D=B4=EA=B7=B8?= =?UTF-8?q?=EB=A0=88=EC=9D=B4=EC=85=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 근태 승인 워크플로우용 신청 테이블 - tenant_id, user_id, request_type, start_date, end_date, status 등 --- ...00000_create_attendance_requests_table.php | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 database/migrations/2026_02_26_100000_create_attendance_requests_table.php diff --git a/database/migrations/2026_02_26_100000_create_attendance_requests_table.php b/database/migrations/2026_02_26_100000_create_attendance_requests_table.php new file mode 100644 index 0000000..3a969c2 --- /dev/null +++ b/database/migrations/2026_02_26_100000_create_attendance_requests_table.php @@ -0,0 +1,39 @@ +id(); + $table->unsignedBigInteger('tenant_id'); + $table->unsignedBigInteger('user_id')->comment('신청자'); + $table->enum('request_type', ['vacation', 'businessTrip', 'remote', 'fieldWork'])->comment('신청 유형'); + $table->date('start_date'); + $table->date('end_date'); + $table->text('reason')->nullable()->comment('사유'); + $table->enum('status', ['pending', 'approved', 'rejected'])->default('pending'); + $table->unsignedBigInteger('approved_by')->nullable()->comment('승인자'); + $table->timestamp('approved_at')->nullable(); + $table->text('reject_reason')->nullable()->comment('반려 사유'); + $table->json('json_details')->nullable()->comment('반차 구분 등 추가 정보'); + $table->timestamps(); + $table->softDeletes(); + + $table->foreign('tenant_id')->references('id')->on('tenants')->cascadeOnDelete(); + $table->foreign('user_id')->references('id')->on('users')->cascadeOnDelete(); + + $table->index(['tenant_id', 'status']); + $table->index(['tenant_id', 'user_id']); + }); + } + + public function down(): void + { + Schema::dropIfExists('attendance_requests'); + } +};