2018-07-21 05:00:17 -07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Events;
|
|
|
|
|
|
|
|
use App\Models\User;
|
|
|
|
use Illuminate\Foundation\Events\Dispatchable;
|
|
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
|
2018-09-10 07:40:26 -07:00
|
|
|
class CheckoutableCheckedIn
|
2018-07-21 05:00:17 -07:00
|
|
|
{
|
|
|
|
use Dispatchable, SerializesModels;
|
|
|
|
|
2018-09-10 07:40:26 -07:00
|
|
|
public $checkoutable;
|
2018-07-21 05:00:17 -07:00
|
|
|
public $checkedOutTo;
|
|
|
|
public $checkedInBy;
|
|
|
|
public $note;
|
2019-03-13 21:36:32 -07:00
|
|
|
public $action_date; // Date setted in the hardware.checkin view at the checkin_at input, for the action log
|
2023-08-31 20:12:07 -07:00
|
|
|
public $originalValues;
|
2018-09-10 07:40:26 -07:00
|
|
|
|
2018-07-21 05:00:17 -07:00
|
|
|
/**
|
|
|
|
* Create a new event instance.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
2023-08-31 20:12:07 -07:00
|
|
|
public function __construct($checkoutable, $checkedOutTo, User $checkedInBy, $note, $action_date = null, $originalValues = [])
|
2018-07-21 05:00:17 -07:00
|
|
|
{
|
2018-09-10 07:40:26 -07:00
|
|
|
$this->checkoutable = $checkoutable;
|
2018-07-21 05:00:17 -07:00
|
|
|
$this->checkedOutTo = $checkedOutTo;
|
2021-06-10 13:15:52 -07:00
|
|
|
$this->checkedInBy = $checkedInBy;
|
|
|
|
$this->note = $note;
|
|
|
|
$this->action_date = $action_date ?? date('Y-m-d');
|
2023-08-31 20:12:07 -07:00
|
|
|
$this->originalValues = $originalValues;
|
2018-07-21 05:00:17 -07:00
|
|
|
}
|
|
|
|
}
|