Order.php
553 字节
<?php
namespace app\admin\model;
use app\common\model\Order as OrderModel;
class Order extends OrderModel
{
/**
* 用户信息
*/
public function user(){
return $this->belongsTo('User');
}
/**
* 读取订单类型
* @return array
*/
public function getTypeList()
{
$typeList = ['payment'=>'待付款','paid'=>'已支付','delivery'=>'待发货','delivered'=>'已发货'];
foreach ($typeList as $k => &$v) {
$v = __($v);
}
return $typeList;
}
}