Files
izyim/app/Classes/Objects/Orders/ReceiveNoteObject.php
T
2019-01-23 23:53:20 +08:00

56 lines
1.0 KiB
PHP

<?php
namespace App\Classes\Objects\Orders\ReceiveNotes;
use Carbon\Carbon;
use Illuminate\Http\Request;
class ReceiveNoteObject
{
/** @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;
}
}