ShopCart.php 496 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace app\common\model\shops;
  3. use app\common\model\BaseModel;
  4. /**
  5. * ShopCart模型
  6. * Class ShopCart
  7. * @package app\common\model\shops
  8. */
  9. class ShopCart extends BaseModel
  10. {
  11. protected $name = 'shop_cart';
  12. public function goodSpecsInventory()
  13. {
  14. return $this->hasOne(ShopGoodSpecsInventory::class, 'id','goods_specs_inventory_id');
  15. }
  16. public function goods()
  17. {
  18. return $this->hasOne(ShopGoods::class, 'id', 'shop_goods_id');
  19. }
  20. }