feat: 근태관리/직원관리 API 구현
- AttendanceController, AttendanceService 추가 - EmployeeController, EmployeeService 추가 - Attendance 모델 및 마이그레이션 추가 - TenantUserProfile에 employee_status 컬럼 추가 - DepartmentService 트리 조회 기능 개선 - Swagger 문서 추가 (AttendanceApi, EmployeeApi) - API 라우트 등록
This commit is contained in:
40
app/Http/Requests/Attendance/UpdateRequest.php
Normal file
40
app/Http/Requests/Attendance/UpdateRequest.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Attendance;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class UpdateRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'status' => 'nullable|in:onTime,late,absent,vacation,businessTrip,fieldWork,overtime,remote',
|
||||
'remarks' => 'nullable|string|max:500',
|
||||
|
||||
// json_details 필드
|
||||
'check_in' => 'nullable|date_format:H:i:s',
|
||||
'check_out' => 'nullable|date_format:H:i:s',
|
||||
'gps_data' => 'nullable|array',
|
||||
'gps_data.check_in' => 'nullable|array',
|
||||
'gps_data.check_in.latitude' => 'nullable|numeric',
|
||||
'gps_data.check_in.longitude' => 'nullable|numeric',
|
||||
'gps_data.check_out' => 'nullable|array',
|
||||
'gps_data.check_out.latitude' => 'nullable|numeric',
|
||||
'gps_data.check_out.longitude' => 'nullable|numeric',
|
||||
'external_work' => 'nullable|array',
|
||||
'external_work.location' => 'nullable|string|max:255',
|
||||
'external_work.purpose' => 'nullable|string|max:500',
|
||||
'work_minutes' => 'nullable|integer|min:0',
|
||||
'overtime_minutes' => 'nullable|integer|min:0',
|
||||
'late_minutes' => 'nullable|integer|min:0',
|
||||
'early_leave_minutes' => 'nullable|integer|min:0',
|
||||
'vacation_type' => 'nullable|string|max:50',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user