belongsTo(\app\admin\model\User::class, 'agent_id')->field('id,nickname,avatar,mobile,prevtime,logintime,jointime'); } public function order() { return $this->belongsTo(\app\admin\model\shopro\order\Order::class, 'order_id'); } public function item() { return $this->belongsTo(\app\admin\model\shopro\order\OrderItem::class, 'order_item_id'); } public function reward() { return $this->hasMany(\app\admin\model\shopro\commission\Reward::class, 'commission_order_id'); } public function buyer() { return $this->belongsTo(\app\admin\model\User::class, 'buyer_id'); } }