using System.Linq; namespace Lebai.SDK.Dtos { public class OriginTasksResult { public int pi { get; set; } public int ps { get; set; } public int total { get; set; } public OriginTaskInfo[] records { get; set; } public TasksResult ToResult() { return new TasksResult { Items = records.Select(n=>n.ToTaskInfo()).ToArray(), PageIndex = pi, PageSize = ps, TotalCount = total }; } } public class TasksResult { /// /// 页索引 /// public int PageIndex { get; set; } /// /// 页大小 /// public int PageSize { get; set; } /// /// 总数量 /// public int TotalCount { get; set; } /// /// 任务列表 /// public TaskInfo[] Items { get; set; } } }