namespace DataSharing.Share.Dtos.CityStateDataExchange
{
    public class CityStateDataExchangeDeReponse
    {
        /// <summary>
        /// 状态
        /// </summary>
        public string code { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        public string msg { get; set; }

        /// <summary>
        /// 受理编号
        /// </summary>
        public string AcceptCode { get; set; }

        /// <summary>
        /// 受理密码
        /// </summary>
        public string AcceptPwd { get; set; }

        /// <summary>
        /// 成功
        /// </summary>
        /// <param name="OrderCode"></param>
        /// <param name="OrderPwd"></param>
        /// <param name="description"></param>
        /// <returns></returns>
        public static CityStateDataExchangeDeReponse Success(string OrderCode, string OrderPwd, string? description = "")
        {
            return new CityStateDataExchangeDeReponse
            {
                code = "1",
                AcceptCode = OrderCode,
                AcceptPwd = OrderPwd,
                msg = (description ?? "您已成功提交数据！")
            };
        }

        /// <summary>
        /// 失败
        /// </summary>
        /// <param name="code"></param>
        /// <param name="description"></param>
        /// <returns></returns>
        public static CityStateDataExchangeDeReponse Failed(string? code = "0", string? description = "")
        {
            return new CityStateDataExchangeDeReponse
            {
                code = code,
                AcceptCode = "",
                AcceptPwd = "",
                msg = (description ?? "接口调用失败！")
            };
        }

    }
}
