GroupBuyHelp.php 790 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace app\common\model\groupbuy;
  3. use app\common\model\BaseModel;
  4. use app\common\model\Goods;
  5. use think\facade\Log;
  6. /**
  7. * 拼团参团模型
  8. * @package app\store\model\coupon
  9. */
  10. class GroupBuyHelp extends BaseModel
  11. {
  12. protected $name = 'group_buy_activity_help';
  13. // 定义主键
  14. protected $pk = 'id';
  15. /**
  16. * 获取记录
  17. * @param int $where
  18. * @param array $with
  19. * @return static
  20. */
  21. public static function detail($where, array $with = [])
  22. {
  23. return static::get($where, $with);
  24. }
  25. /**
  26. * 关联用户表
  27. * @return \think\model\relation\BelongsTo
  28. */
  29. public function user()
  30. {
  31. $module = self::getCalledModule();
  32. return $this->belongsTo("app\\{$module}\\model\\User");
  33. }
  34. }