ShoppingDetail.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 $shopping_id 购物车id
  10. * @property int|null $goods_id 商品id
  11. * @property int|null $goods_spec_id 商品规格id
  12. * @property int|null $number 该规格值的数量(主要针对影响数量的多选规格)
  13. * @property \Illuminate\Support\Carbon|null $created_at
  14. * @property \Illuminate\Support\Carbon|null $updated_at
  15. * @method static \Illuminate\Database\Eloquent\Builder|ShoppingDetail newModelQuery()
  16. * @method static \Illuminate\Database\Eloquent\Builder|ShoppingDetail newQuery()
  17. * @method static \Illuminate\Database\Eloquent\Builder|ShoppingDetail query()
  18. * @method static \Illuminate\Database\Eloquent\Builder|ShoppingDetail whereCreatedAt($value)
  19. * @method static \Illuminate\Database\Eloquent\Builder|ShoppingDetail whereGoodsId($value)
  20. * @method static \Illuminate\Database\Eloquent\Builder|ShoppingDetail whereGoodsSpecId($value)
  21. * @method static \Illuminate\Database\Eloquent\Builder|ShoppingDetail whereId($value)
  22. * @method static \Illuminate\Database\Eloquent\Builder|ShoppingDetail whereNumber($value)
  23. * @method static \Illuminate\Database\Eloquent\Builder|ShoppingDetail whereShoppingId($value)
  24. * @method static \Illuminate\Database\Eloquent\Builder|ShoppingDetail whereUpdatedAt($value)
  25. * @mixin \Eloquent
  26. */
  27. class ShoppingDetail extends Model
  28. {
  29. /**
  30. * The table associated with the model.
  31. *
  32. * @var string
  33. */
  34. protected $table = 'shopping_details';
  35. /**
  36. * The primary key associated with the table.
  37. *
  38. * @var string
  39. */
  40. protected $primaryKey = 'id';
  41. /**
  42. * Indicates if the model should be timestamped.
  43. *
  44. * @var bool
  45. */
  46. public $timestamps = true;
  47. /**
  48. * 不能被批量赋值的属性
  49. *
  50. * @var array
  51. */
  52. protected $guarded = ['id', 'updated_at', 'created_at'];
  53. }