Shopping.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. namespace App\Models;
  3. use DateTimeInterface;
  4. use Illuminate\Database\Eloquent\Model;
  5. /**
  6. * 购物车表
  7. *
  8. * @property int $id 购物车表
  9. * @property int|null $m_id 用户id
  10. * @property int|null $shop_id 店铺id
  11. * @property int|null $goods_id 商品id
  12. * @property int|null $category_id 分类id
  13. * @property int|null $number 商品购买数量
  14. * @property \Illuminate\Support\Carbon|null $created_at
  15. * @property \Illuminate\Support\Carbon|null $updated_at
  16. * @method static \Illuminate\Database\Eloquent\Builder|Shopping newModelQuery()
  17. * @method static \Illuminate\Database\Eloquent\Builder|Shopping newQuery()
  18. * @method static \Illuminate\Database\Eloquent\Builder|Shopping query()
  19. * @method static \Illuminate\Database\Eloquent\Builder|Shopping whereCategoryId($value)
  20. * @method static \Illuminate\Database\Eloquent\Builder|Shopping whereCreatedAt($value)
  21. * @method static \Illuminate\Database\Eloquent\Builder|Shopping whereGoodsId($value)
  22. * @method static \Illuminate\Database\Eloquent\Builder|Shopping whereId($value)
  23. * @method static \Illuminate\Database\Eloquent\Builder|Shopping whereMId($value)
  24. * @method static \Illuminate\Database\Eloquent\Builder|Shopping whereNumber($value)
  25. * @method static \Illuminate\Database\Eloquent\Builder|Shopping whereShopId($value)
  26. * @method static \Illuminate\Database\Eloquent\Builder|Shopping whereUpdatedAt($value)
  27. * @mixin \Eloquent
  28. */
  29. class Shopping extends Model
  30. {
  31. /**
  32. * The table associated with the model.
  33. *
  34. * @var string
  35. */
  36. protected $table = 'shopping';
  37. /**
  38. * The primary key associated with the table.
  39. *
  40. * @var string
  41. */
  42. protected $primaryKey = 'id';
  43. /**
  44. * Indicates if the model should be timestamped.
  45. *
  46. * @var bool
  47. */
  48. public $timestamps = true;
  49. /**
  50. * 不能被批量赋值的属性
  51. *
  52. * @var array
  53. */
  54. protected $guarded = ['id', 'updated_at', 'created_at'];
  55. }