Files
sam-api/app/Http/Requests/TenantStatField/TenantStatFieldStoreRequest.php

29 lines
801 B
PHP
Raw Normal View History

<?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',
];
}
}