update project
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
<?php declare(strict_types=1);
|
||||
namespace App\Http\Requests\Reporting;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use App\Domain\SchoolCore\Reporting\DTO\ScheduledReportData;
|
||||
|
||||
final class ScheduleReportRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool { return true; }
|
||||
public function rules(): array { return ['report_key' => ['required','string'], 'filters' => ['sometimes','array'], 'columns' => ['sometimes','array']]; }
|
||||
public function toDTO(): ScheduledReportData { return new ScheduledReportData((string) $this->input('report_key'), $this->input('filters', []), $this->input('columns'), (string) $this->input('format', 'csv'), (string) $this->input('frequency', 'weekly'), (string) $this->input('run_at'), $this->input('recipient_user_ids', []), $this->input('recipient_emails'), $this->input('expires_at'), $this->input('metadata', [])); }
|
||||
}
|
||||
Reference in New Issue
Block a user