Files
izyim/app/Classes/Modules/Orders/ReceiveNotes/ReceiveNote.php
T
2019-01-23 23:53:20 +08:00

57 lines
1.0 KiB
PHP

<?php
namespace App\Classes\Modules\Orders\ReceiveNotes;
use App\Http\Requests\ReceiveNoteValidator;
use Carbon\Carbon;
use Illuminate\Http\Request;
class ReceiveNote
{
/** @var int */
protected $orderId;
/** @var string */
protected $trackingNo;
/** @var Carbon */
protected $receiveDate;
/**
* AbstractReceiveNote constructor.
* @param int $orderId
* @param Request $request
*/
public function __construct(int $orderId, Request $request)
{
$this->orderId = $orderId;
$this->trackingNo = $request->input('tracking_no');
$this->receiveDate = Carbon::parse($request->input('receive_date'));
}
/**
* @return int
*/
public function getOrderId(): int
{
return $this->orderId;
}
/**
* @return string
*/
public function getTrackingNo(): string
{
return $this->trackingNo;
}
/**
* @return Carbon
*/
public function getReceiveDate(): Carbon
{
return $this->receiveDate;
}
}