WechatQrcode.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2020 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\common\model\wechat;
  12. use app\common\model\BaseModel;
  13. /**
  14. * Class WechatQrcode
  15. * @package app\common\model\wechat
  16. * @author xaboy
  17. * @day 2020-04-28
  18. */
  19. class WechatQrcode extends BaseModel
  20. {
  21. /**
  22. * @return string
  23. * @author xaboy
  24. * @day 2020-03-30
  25. */
  26. public static function tablePk(): string
  27. {
  28. return 'wechat_qrcode_id';
  29. }
  30. /**
  31. * @return string
  32. * @author xaboy
  33. * @day 2020-03-30
  34. */
  35. public static function tableName(): string
  36. {
  37. return 'wechat_qrcode';
  38. }
  39. /**
  40. * @return mixed
  41. * @author xaboy
  42. * @day 2020-04-28
  43. */
  44. public function incTicket()
  45. {
  46. return self::getDB()->where('wechat_qrcode_id', $this->wechat_qrcode_id)->inc('scan')->update();
  47. }
  48. }