namespace DeviceRepair.Models.Common
{
    public class ServerApiResponse
    {
        /// <summary>
        /// API执行状态编码
        /// 0：API执行成功
        /// -1 OR 其他：API执行不成功
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// API执行成功或者失败的消息
        /// </summary>
        public string Msg { get; set; }
        public object Datas { get; set; }
        /// <summary>
        /// 获取API调用是否成功状态
        /// </summary>
        public bool IsSuccess
        {
            get
            {
                return Code.Equals("0");
            }
        }
    }
}
