This commit is contained in:
2023-07-21 21:06:45 +03:00
parent 2f108bef4f
commit fa5a8a9001
37 changed files with 2319 additions and 28 deletions
@@ -0,0 +1,23 @@
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<AccountSimple>? 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; }
}*/