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

25 lines
390 B

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