Finish building out schedule management functionality
This commit is contained in:
parent
4ac6507b69
commit
1e0d630e1f
16 changed files with 510 additions and 79 deletions
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
namespace Pterodactyl\Http\Requests\Api\Client\Servers\Schedules;
|
||||
|
||||
use Pterodactyl\Models\Permission;
|
||||
|
||||
class StoreScheduleRequest extends ViewScheduleRequest
|
||||
{
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function permission(): string
|
||||
{
|
||||
return Permission::ACTION_SCHEDULE_CREATE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'name' => 'required|string|min:1',
|
||||
'is_active' => 'boolean',
|
||||
'minute' => 'required|string',
|
||||
'hour' => 'required|string',
|
||||
'day_of_month' => 'required|string',
|
||||
'day_of_week' => 'required|string',
|
||||
];
|
||||
}
|
||||
}
|
Reference in a new issue