WechatQrcode.php 794 B

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