hasMany(OrderDetail::class); } public function details() { return $this->hasMany(OrderDetail::class, 'order_id'); } public function refund_requests() { return $this->hasMany(RefundRequest::class); } public function user() { return $this->belongsTo(User::class); } public function shop() { return $this->hasOne(Shop::class, 'user_id', 'seller_id'); } public function pickup_point() { return $this->belongsTo(PickupPoint::class); } public function affiliate_log() { return $this->hasMany(AffiliateLog::class); } public function club_point() { return $this->hasMany(ClubPoint::class); } public function delivery_boy() { return $this->belongsTo(User::class, 'assign_delivery_boy', 'id'); } public function proxy_cart_reference_id() { return $this->hasMany(ProxyPayment::class)->select('reference_id'); } }