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.

32 lines
570 B

5 years ago
5 years ago
5 years ago
  1. <?php
  2. namespace App\Model\v3;
  3. use App\Model\Model;
  4. // use Hyperf\Database\Model\SoftDeletes;
  5. class ShoppingCart extends Model
  6. {
  7. // use SoftDeletes;
  8. protected $table = 'lanzu_shopping_cart';
  9. protected $fillable = [
  10. 'id',
  11. 'user_id',
  12. 'goods_id',
  13. 'market_id',
  14. 'store_id',
  15. 'num',
  16. 'activity_type',
  17. 'goods_type'
  18. ];
  19. public function store()
  20. {
  21. return $this->belongsTo(Store::class, 'store_id', 'id');
  22. }
  23. public function goods()
  24. {
  25. return $this->morphTo();
  26. }
  27. }