belongsTo('User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function address() { return $this->belongsTo('Address', 'address_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function orderGoods() { return $this->hasMany('OrderGoods', 'order_sn', 'order_sn'); } public function orderElectronics() { return $this->hasMany('OrderElectronics', 'order_sn', 'order_sn'); } public function orderAction() { return $this->hasMany('OrderAction', 'order_sn', 'order_sn'); } public function orderAddress() { return $this->hasOne('OrderAddress', 'order_id', 'id'); } public function orderProfile() { return $this->hasOne('OrderProfile', 'order_id', 'id'); } }