using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PTMedicalInsurance.Business
{
    /// <summary>
    /// 方法调用通用返回对象
    /// </summary>
    public class CallResult
    {
        public int Code { set; get; }

        public string ErrMsg { set; get; }

        public string Data { set; get; }

        public object PureData { set; get; }

        public CallResult(int code, string errMsg, string data)
        {
            Code = code;
            ErrMsg = errMsg;
            Data = data;
            PureData = data;
        }

        public CallResult(int code, string errMsg, string data,object pure)
        {
            Code = code;
            ErrMsg = errMsg;
            Data = data;
            PureData = pure;
        }

        public bool Success {
            get {
                return this.Code == 0;
            }
        }
    }
}
