|
@@ -1,10 +1,15 @@
|
|
|
<?php
|
|
|
namespace logistics;
|
|
|
|
|
|
+use app\common\model\LogisticsCompany;
|
|
|
+use fast\Arr;
|
|
|
+
|
|
|
abstract class QueryInterface{
|
|
|
protected $no;
|
|
|
protected $username;
|
|
|
protected $phone;
|
|
|
+ /** @var LogisticsCompany */
|
|
|
+ protected $logistics;
|
|
|
abstract public function query();
|
|
|
public function setNo($value){
|
|
|
$this->no=$value;
|
|
@@ -44,4 +49,23 @@ abstract class QueryInterface{
|
|
|
return $this->phone;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @param LogisticsCompany $logistics
|
|
|
+ */
|
|
|
+ public function setLogistics(LogisticsCompany $logistics)
|
|
|
+ {
|
|
|
+ $this->logistics = $logistics;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return LogisticsCompany
|
|
|
+ */
|
|
|
+ public function getLogistics($field=null)
|
|
|
+ {
|
|
|
+ if(is_null($field)) {
|
|
|
+ return $this->logistics;
|
|
|
+ }
|
|
|
+ return Arr::get($this->logistics,$field);
|
|
|
+ }
|
|
|
}
|