using System.ComponentModel;

namespace WCS.WorkEngineering.WebApi.Models.WMS.Response
{
    /// <summary>
    ///  WCS上传信息接口返回
    /// </summary>
    public class SRes
    {
        /// <summary>
        /// 返回状态码
        /// </summary>
        public ResponseStatusCodeEnum ResCode { get; set; }

        /// <summary>
        /// 返回描述信息
        /// </summary>
        public string ResMsg { get; set; } = "成功";

        /// <summary>
        /// 备用
        /// </summary>
        public string Memo1 { get; set; }

        /// <summary>
        /// 备用
        /// </summary>
        public string Memo2 { get; set; }

        /// <summary>
        /// 备用
        /// </summary>
        public string Memo3 { get; set; }
    }

    /// <summary>
    ///  WMS返回DTO
    /// </summary>
    /// <typeparam name="T">泛型</typeparam>
    public class SRes<T> : SRes
    {
        /// <summary>
        /// 数据实体
        /// </summary>
        public T ResData { get; set; }

        /// <summary>
        ///  集合数据实体
        /// </summary>
        public List<T> ResDataList { get; set; }
    }

    public enum ResponseStatusCodeEnum
    {
        /// <summary>
        /// 成功
        /// </summary>
        [Description("成功")]
        Sucess = 200,

        /// <summary>
        /// 参数错误
        /// </summary>
        [Description("参数错误")]
        AccountError = 1001,

        /// <summary>
        /// 业务逻辑错误
        /// </summary>
        [Description("业务逻辑错误")]
        DataSaveErr = 1002,
    }
}
