CREATE TABLE `__PREFIX__third` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID', `platform` varchar(30) NOT NULL DEFAULT '' COMMENT '第三方应用', `openid` varchar(50) NOT NULL DEFAULT '' COMMENT '第三方唯一ID', `openname` varchar(50) NOT NULL DEFAULT '' COMMENT '第三方会员昵称', `access_token` varchar(255) NOT NULL DEFAULT '' COMMENT 'AccessToken', `refresh_token` varchar(255) NOT NULL DEFAULT 'RefreshToken', `expires_in` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '有效期', `createtime` int(10) unsigned DEFAULT NULL COMMENT '创建时间', `updatetime` int(10) unsigned DEFAULT NULL COMMENT '更新时间', `logintime` int(10) unsigned DEFAULT NULL COMMENT '登录时间', `expiretime` int(10) unsigned DEFAULT NULL COMMENT '过期时间', PRIMARY KEY (`id`), UNIQUE KEY `platform` (`platform`,`openid`), KEY `user_id` (`user_id`,`platform`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='第三方登录表';