AisCardUser.php 909 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2017 https://www.sapixx.com All rights reserved.
  4. * @license Licensed (http://www.apache.org/licenses/LICENSE-2.0).
  5. * @author pillar<ltmn@qq.com>
  6. * 会员用户管理
  7. */
  8. namespace app\ais\model;
  9. use think\Model;
  10. class AisCardUser extends Model{
  11. protected $pk = 'id';
  12. /**
  13. * 好店
  14. * @return void
  15. */
  16. public function store(){
  17. return $this->hasOne('AisStore','id','store_id');
  18. }
  19. /**
  20. * 储值卡
  21. * @return void
  22. */
  23. public function card(){
  24. return $this->hasOne('AisCard','id','card_id');
  25. }
  26. /**
  27. * 优惠券
  28. * @return void
  29. */
  30. public function couponUser(){
  31. return $this->hasOne('AisCouponUser','id','user_coupon_id');
  32. }
  33. //用户
  34. public function user(){
  35. return $this->hasOne('app\common\model\SystemUser','id','uid');
  36. }
  37. }