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.

31 lines
505 B

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