Files
myoffice/MyOffice.Services/Dashboard/Domain/DashboardData.cs
T
2023-07-21 21:06:45 +03:00

23 lines
757 B
C#

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; }
}*/