feat: I-8 휴가 정책 관리 API 구현
- LeavePolicyController: 휴가 정책 CRUD API - LeavePolicyService: 정책 관리 로직 - LeavePolicy 모델: 다중 테넌트 지원 - FormRequest 검증 클래스 - Swagger 문서화 - leave_policies 테이블 마이그레이션 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('leave_policies', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('tenant_id')->unique()->constrained()->onDelete('cascade')->comment('테넌트 ID');
|
||||
|
||||
// 기준 설정
|
||||
$table->enum('standard_type', ['fiscal', 'hire'])->default('fiscal')->comment('기준 유형: fiscal=회계연도, hire=입사일');
|
||||
$table->tinyInteger('fiscal_start_month')->default(1)->comment('회계연도 시작 월 (1-12)');
|
||||
$table->tinyInteger('fiscal_start_day')->default(1)->comment('회계연도 시작 일 (1-31)');
|
||||
|
||||
// 연차 설정
|
||||
$table->tinyInteger('default_annual_leave')->default(15)->comment('기본 연차 일수');
|
||||
$table->tinyInteger('additional_leave_per_year')->default(1)->comment('근속년수당 추가 연차');
|
||||
$table->tinyInteger('max_annual_leave')->default(25)->comment('최대 연차 일수');
|
||||
|
||||
// 이월 설정
|
||||
$table->boolean('carry_over_enabled')->default(true)->comment('이월 허용 여부');
|
||||
$table->tinyInteger('carry_over_max_days')->default(10)->comment('최대 이월 일수');
|
||||
$table->tinyInteger('carry_over_expiry_months')->default(3)->comment('이월 연차 소멸 기간 (개월)');
|
||||
|
||||
// 감사 필드
|
||||
$table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete()->comment('생성자');
|
||||
$table->foreignId('updated_by')->nullable()->constrained('users')->nullOnDelete()->comment('수정자');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('leave_policies');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user