* 支付有礼 */ namespace app\allwin\model; use think\Model; class AllwinGiftStore extends Model{ protected $pk = 'id'; //关联用户信息 public function store(){ return $this->hasOne('AllwinStore','id','store_id'); } //所属活动 public function gift(){ return $this->hasOne('AllwinGift','id','gift_id'); } }