namespace MyOffice.Services.Dashboard.Domain; using System.Collections.Generic; using Data.Models.Accounts; public class DashboardData { public decimal IncomeLastWeek { get; set; } public decimal IncomePreviousWeek { get; set; } public decimal OutcomeLastWeek { get; set; } public decimal OutcomePreviousWeek { get; set; } public List? Rests { get; set; } public decimal? RestTotal => Rests?.Sum(x => x.Rest); public decimal? RestTotalPlus => Rests?.Where(x => x.Rest > 0).Sum(x => x.Rest); public decimal? RestTotalMinus => Rests?.Where(x => x.Rest < 0).Sum(x => x.Rest); } /*public class DashboardRestData { public string AccountId { get; set; } public string AccountName { get; set; } public decimal Rest { get; set; } }*/