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.
26 lines
449 B
26 lines
449 B
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class AgentProduct extends BaseModel
|
|
{
|
|
use HasFactory, SoftDeletes;
|
|
|
|
public function product()
|
|
{
|
|
return $this->belongsTo(Product::class)->where('status', 1);
|
|
}
|
|
|
|
public function coupon()
|
|
{
|
|
return $this->hasMany(Coupon::class);
|
|
}
|
|
|
|
public function fav()
|
|
{
|
|
return $this->hasOne(UserFav::class);
|
|
}
|
|
}
|