海南旅游SAAS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

20 lines
356 B

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class AgentProduct extends BaseModel
{
use HasFactory;
public function product()
{
return $this->belongsTo(Product::class)->where('status', 1);
}
public function coupon()
{
return $this->hasMany(Coupon::class)->orWhereIn('agent_product_id', [0]);
}
}