WechatQrcode.php 874 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /**
  3. * @package merchant
  4. *
  5. * @author xaboy
  6. * @day 2020-04-28
  7. *
  8. *
  9. */
  10. namespace app\common\model\wechat;
  11. use app\common\model\BaseModel;
  12. /**
  13. * Class WechatQrcode
  14. * @package app\common\model\wechat
  15. * @author xaboy
  16. * @day 2020-04-28
  17. */
  18. class WechatQrcode extends BaseModel
  19. {
  20. /**
  21. * @return string
  22. * @author xaboy
  23. * @day 2020-03-30
  24. */
  25. public static function tablePk(): string
  26. {
  27. return 'wechat_qrcode_id';
  28. }
  29. /**
  30. * @return string
  31. * @author xaboy
  32. * @day 2020-03-30
  33. */
  34. public static function tableName(): string
  35. {
  36. return 'wechat_qrcode';
  37. }
  38. /**
  39. * @return mixed
  40. * @author xaboy
  41. * @day 2020-04-28
  42. */
  43. public function incTicket()
  44. {
  45. return self::getDB()->where('wechat_qrcode_id', $this->wechat_qrcode_id)->inc('scan')->update();
  46. }
  47. }