using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace DllEapEntity.Dtos { public class LayuiModel { public LayuiModel() { } public LayuiModel(int count, IEnumerable datas) { this.count = count; this.data = datas; } public int code { get; set; } = 1; public string msg { get; set; } public int count { get; set; } public int extra { get; set; } public IEnumerable data { get; set; } public object extraObject { get; set; } /// /// 创建空列表 /// /// /// public static LayuiModel CreateEmptyList(string error = null) { var temp = new LayuiModel { code = 1, data = null, count = 0 }; if (!string.IsNullOrEmpty(error)) { temp.code = -1; temp.msg = error; } return temp; } } }