海南旅游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.

26 lines
449 B

4 years ago
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Factories\HasFactory;
  4. use Illuminate\Database\Eloquent\SoftDeletes;
  5. class AgentProduct extends BaseModel
  6. {
  7. use HasFactory, SoftDeletes;
  8. public function product()
  9. {
  10. return $this->belongsTo(Product::class)->where('status', 1);
  11. }
  12. public function coupon()
  13. {
  14. return $this->hasMany(Coupon::class);
  15. }
  16. public function fav()
  17. {
  18. return $this->hasOne(UserFav::class);
  19. }
  20. }