using Newtonsoft.Json.Linq;

namespace SicboSub.Web.Models
{
    /// <summary>
    /// Base Response class
    /// </summary>
    public class CommonResponse
    {
        public string? errorCode { get; set; }
        public string? message { get; set; }

        public void BuildCommonResponse(string dataGet)
        {
            JObject jObject = JObject.Parse(dataGet);
            if (jObject != null)
            {
                errorCode = jObject["errorCode"]?.ToString();
                message = jObject["message"]?.ToString();
            }
        }
    }
}
