SmartbcCouponUser.php 777 B

12345678910111213141516171819202122232425262728293031323334353637
  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\smartbc\model;
  9. use think\Model;
  10. class SmartbcCouponUser extends Model{
  11. /**
  12. * 好店
  13. * @return void
  14. */
  15. public function store(){
  16. return $this->hasOne('SmartbcStore','id','store_id');
  17. }
  18. /**
  19. * 用户
  20. * @return void
  21. */
  22. public function user(){
  23. return $this->hasOne('app\common\model\SystemUser','id','uid');
  24. }
  25. /**
  26. * 优惠券
  27. * @return void
  28. */
  29. public function coupon(){
  30. return $this->hasOne('SmartbcCoupon','id','coupon_id');
  31. }
  32. }