using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime;
namespace WIDESEA_Core
{
public class WebResponseContent
{
public WebResponseContent()
{
}
public WebResponseContent(bool status)
{
Status = status;
}
public bool Status { get; set; }
public bool success { get; set; }
public int Code { get; set; }
public string Message { get; set; }
public string msg { get; set; }
public object Data { get; set; }
public string DevMessage { get; set; }
public WebResponseContent OK()
{
Status = true;
return this;
}
public static WebResponseContent Instance
{
get { return new WebResponseContent(); }
}
public WebResponseContent OK(string message = null, object data = null)
{
Status = true;
Message = message;
Data = data;
return this;
}
public WebResponseContent Error(string message = null)
{
Status = false;
Message = message;
return this;
}
}
public class WCSback
{
///
/// 是否成功,成功返回空,异常返回异常信息
///
public string message { get; set; }
///
/// 1成功,0失败
///
public int code { get; set; }
public bool success { get; set; }
public bool data { get; set; }
public string msg { get; set; }
public static WCSback Instance
{
get { return new WCSback(); }
}
public WCSback OK(string message = null, object data = null)
{
success = true;
code = 200;
msg = "请求成功";
data = true;
return this;
}
public WCSback Error(string message = null)
{
code = 999;
message = message;
return this;
}
}
}