using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace iWare.Authorize { /// /// 方法返回实体 /// public class AuthorizeFunRetEntity { /// /// 方法返回结果 /// public bool result { get; set; } /// /// 方法返回消息 /// public string resMsg { get; set; } /// /// 方法警告消息 /// public string warnMsg { get; set; } public object resData { get; set; } /// /// 剩余天数 /// public double? remainingDays { get; set; } /// /// 返回成功 /// /// /// public static AuthorizeFunRetEntity Success(string _resMsg, object _resData = null) { return new AuthorizeFunRetEntity() { result = true, resMsg = _resMsg, resData = _resData }; } /// /// 返回成功 /// /// /// public static AuthorizeFunRetEntity Success(string _resMsg, double _remainingDays) { return new AuthorizeFunRetEntity() { result = true, resMsg = _resMsg, remainingDays = _remainingDays }; } /// /// 返回成功 /// /// /// public static AuthorizeFunRetEntity Success(string _resMsg, double _remainingDays, string _warnMsg) { return new AuthorizeFunRetEntity() { result = true, resMsg = _resMsg, remainingDays = _remainingDays, warnMsg = _warnMsg }; } /// /// 返回失败 /// /// /// public static AuthorizeFunRetEntity Fail(string _resMsg, object _resData = null) { return new AuthorizeFunRetEntity() { result = false, resMsg = _resMsg, resData = _resData }; } /// /// 返回失败 /// /// /// public static AuthorizeFunRetEntity Fail(string _resMsg, double _remainingDays) { return new AuthorizeFunRetEntity() { result = false, resMsg = _resMsg, remainingDays = _remainingDays }; } } }