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

22 lines
443 B

  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Factories\HasFactory;
  4. use Illuminate\Database\Eloquent\Model;
  5. class UserFav extends BaseModel
  6. {
  7. use HasFactory;
  8. protected $guarded = ['id', 'created_at', 'updated_at']; //不允许批量赋值的字段
  9. public function agentProduct()
  10. {
  11. return $this->belongsTo(AgentProduct::class);
  12. }
  13. public function product()
  14. {
  15. return $this->belongsTo(Product::class);
  16. }
  17. }