using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace LYFZ.WXLibrary
{
///
/// 第三方平台 已授权公众号的授权信息
///
public class AuthorizationInfo
{
/*
第三方平台appid
1413192760
authorized
公众号appid
授权码(code)
过期时间
*/
public AuthorizationInfo() {
}
string _AppId = "";
///
/// 第三方平台appid
///
public string AppId
{
get { return _AppId; }
set { _AppId = value; }
}
string _CreateTime = "";
///
/// 授权时间戳
///
public string CreateTime
{
get { return _CreateTime; }
set { _CreateTime = value; }
}
AuthorizationInfoType _InfoType = AuthorizationInfoType.unauthorized;
///
/// 授权信息类型
///
public AuthorizationInfoType InfoType
{
get { return _InfoType; }
set { _InfoType = value; }
}
string _AuthorizerAppid = "";
///
/// 授权公众号appid
///
public string AuthorizerAppid
{
get { return _AuthorizerAppid; }
set { _AuthorizerAppid = value; }
}
string _AuthorizationCode = "";
///
/// 授权码(code)
///
public string AuthorizationCode
{
get { return _AuthorizationCode; }
set { _AuthorizationCode = value; }
}
DateTime _AuthorizationCodeExpiredTime = DateTime.Now;
///
/// 过期时间
///
public DateTime AuthorizationCodeExpiredTime
{
get { return _AuthorizationCodeExpiredTime; }
set { _AuthorizationCodeExpiredTime = value; }
}
public override string ToString()
{
return ""
+ "" + AppId + ""
+ "" + CreateTime + ""
+ "" + InfoType + ""
+ "" + AuthorizerAppid + ""
+ "" + AuthorizationCode + ""
+ "" + AuthorizationCodeExpiredTime.ToString("yyyy-MM-dd HH:mm:ss") + ""
+"";
}
}
///
/// 授权信息类型
///
public enum AuthorizationInfoType
{
///
/// 用户取消授权
///
unauthorized,
///
/// 授权成功通知
///
authorized,
///
/// 授权更新通知
///
updateauthorized,
}
}