Make maintenance also optional to notify subscribers

This commit is contained in:
Anne-Greeth van Herwijnen
2019-04-26 11:50:15 +02:00
parent ef189a4d4f
commit a86793079c
6 changed files with 50 additions and 8 deletions

View File

@@ -60,6 +60,13 @@ final class CreateScheduleCommand
*/
public $components;
/**
* Whether to notify that the incident was reported.
*
* @var bool
*/
public $notify;
/**
* The validation rules.
*
@@ -72,6 +79,7 @@ final class CreateScheduleCommand
'scheduled_at' => 'required|string',
'completed_at' => 'nullable|string',
'components' => 'nullable|array',
'notify' => 'nullable|bool'
];
/**
@@ -83,10 +91,11 @@ final class CreateScheduleCommand
* @param string $scheduled_at
* @param string $completed_at
* @param array $components
* @param notify $notify
*
* @return void
*/
public function __construct($name, $message, $status, $scheduled_at, $completed_at, array $components = [])
public function __construct($name, $message, $status, $scheduled_at, $completed_at, array $components = [], $notify)
{
$this->name = $name;
$this->message = $message;
@@ -94,5 +103,6 @@ final class CreateScheduleCommand
$this->scheduled_at = $scheduled_at;
$this->completed_at = $completed_at;
$this->components = $components;
$this->notify = $notify;
}
}