GoodsSku.php 645 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. *
  4. * @copyright ©2020 点小铺
  5. * @author hanj
  6. * @link: https://dyuit.com
  7. * Created by VSCode
  8. */
  9. namespace app\common\model\sharp;
  10. use app\common\model\BaseModel;
  11. /**
  12. * 整点秒杀-秒杀商品sku模型
  13. * Class Goods
  14. * @package app\common\model\sharp
  15. */
  16. class GoodsSku extends BaseModel
  17. {
  18. protected $name = 'sharp_goods_sku';
  19. /**
  20. * 关联商品表
  21. * @return \think\model\relation\BelongsTo
  22. */
  23. public function goods()
  24. {
  25. $module = self::getCalledModule() ?: 'common';
  26. return $this->belongsTo("app\\{$module}\\model\\sharp\\Goods");
  27. }
  28. }