Files
sam-api/app/Http/Requests/TenantStatField/TenantStatFieldStoreRequest.php
hskwon ffcc6c3742 feat: TenantStatField API 구현
- TenantStatFieldService: CRUD + reorder + bulkUpsert 로직 구현
- TenantStatFieldController: 7개 엔드포인트 (SAM API Rules 준수)
- FormRequest: Store/Update 검증 클래스 생성
- Swagger: 완전한 API 문서화 (6개 스키마, 7개 엔드포인트)
- i18n: message.tenant_stat_field 키 추가
- Route: /tenant-stat-fields 7개 라우트 등록

유니크 제약 검증: tenant_id + target_table + field_key
집계 함수 필터링: avg, sum, min, max, count
2025-11-14 14:09:53 +09:00

29 lines
801 B
PHP

<?php
namespace App\Http\Requests\TenantStatField;
use Illuminate\Foundation\Http\FormRequest;
class TenantStatFieldStoreRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'target_table' => 'required|string|max:50',
'field_key' => 'required|string|max:100',
'field_name' => 'required|string|max:100',
'field_type' => 'required|string|max:20',
'aggregation_types' => 'nullable|array',
'aggregation_types.*' => 'string|in:avg,sum,min,max,count',
'is_critical' => 'nullable|boolean',
'display_order' => 'nullable|integer|min:0',
'description' => 'nullable|string',
];
}
}