__('百世快递'), '0' => __('中通快递'),'2' => __('申通快递'), '3' => __('圆通快递'),'4' => __('韵达快递'), '5' => __('邮政快递包裹'), '6' => __('EMS'), '7' => __('天天快递'),'8' => __('京东物流'),'9' => __('优速快递'),'10' => __('德邦'),'11' => __('宅急送'),'12' => __('爱尔兰邮政')]; } public function getStatusList() { return ['1' => __('已支付'), '0' => __('待支付'),'2' => __('待转售'), '3' => __('委卖中'),'4' => __('提货中'), '5' => __('已提货'), '6' => __('已完成'), '-1' => __('已取消')]; } public function getPayTimeTextAttr($value, $data) { $value = $value ? $value : (isset($data['pay_time']) ? $data['pay_time'] : ''); return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value; } protected function setPayTimeAttr($value) { return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value); } public function user() { return $this->belongsTo('\app\admin\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0); } // public function user() // { // return $this->belongsTo('\app\admin\model\User', 'buyer_id', 'id', [], 'LEFT')->setEagerlyType(0); // } // public function user1() // { // return $this->belongsTo('\app\admin\model\User', 'seller_id', 'id', [], 'LEFT')->setEagerlyType(0); // } public function warehouse() { return $this->belongsTo('\app\admin\model\Warehouse', 'warehouse_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function detail() { return $this->belongsTo('\app\admin\model\order\Detail', 'id', 'order_id', [], 'LEFT')->setEagerlyType(0); } }