UserFav.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace App\Models\User;
  3. use App\Base\BaseModel;
  4. use App\Models\Goods\Goods;
  5. use Illuminate\Database\Eloquent\SoftDeletes;
  6. /**
  7. * App\Models\User\UserFav
  8. *
  9. * @property int $id
  10. * @property int $user_id
  11. * @property int $goods_id
  12. * @property \Illuminate\Support\Carbon|null $created_at
  13. * @property \Illuminate\Support\Carbon|null $updated_at
  14. * @method static \Illuminate\Database\Eloquent\Builder|UserFav newModelQuery()
  15. * @method static \Illuminate\Database\Eloquent\Builder|UserFav newQuery()
  16. * @method static \Illuminate\Database\Eloquent\Builder|UserFav query()
  17. * @method static \Illuminate\Database\Eloquent\Builder|UserFav whereCreatedAt($value)
  18. * @method static \Illuminate\Database\Eloquent\Builder|UserFav whereGoodsId($value)
  19. * @method static \Illuminate\Database\Eloquent\Builder|UserFav whereId($value)
  20. * @method static \Illuminate\Database\Eloquent\Builder|UserFav whereUpdatedAt($value)
  21. * @method static \Illuminate\Database\Eloquent\Builder|UserFav whereUserId($value)
  22. * @mixin \Eloquent
  23. * @property string|null $deleted_at
  24. * @method static \Illuminate\Database\Eloquent\Builder|UserFav whereDeletedAt($value)
  25. * @method static \Illuminate\Database\Query\Builder|UserFav onlyTrashed()
  26. * @method static \Illuminate\Database\Query\Builder|UserFav withTrashed()
  27. * @method static \Illuminate\Database\Query\Builder|UserFav withoutTrashed()
  28. * @property-read Goods|null $good
  29. */
  30. class UserFav extends BaseModel
  31. {
  32. use SoftDeletes;
  33. protected $table = "user_fav";
  34. public function good()
  35. {
  36. return $this->belongsTo(Goods::class, "goods_id");
  37. }
  38. }