AllwinGiftStore.php 570 B

123456789101112131415161718192021222324
  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\allwin\model;
  9. use think\Model;
  10. class AllwinGiftStore extends Model{
  11. protected $pk = 'id';
  12. //关联用户信息
  13. public function store(){
  14. return $this->hasOne('AllwinStore','id','store_id');
  15. }
  16. //所属活动
  17. public function gift(){
  18. return $this->hasOne('AllwinGift','id','gift_id');
  19. }
  20. }