|
|
@ -10,6 +10,11 @@ class AgentProduct extends BaseModel |
|
|
|
|
|
|
|
|
public function product() |
|
|
public function product() |
|
|
{ |
|
|
{ |
|
|
return $this->belongsTo(Product::class); |
|
|
|
|
|
|
|
|
return $this->belongsTo(Product::class)->where('status', 1); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function coupon() |
|
|
|
|
|
{ |
|
|
|
|
|
return $this->hasMany(Coupon::class)->orWhereIn('agent_product_id', [0]); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |