using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ProjectFamilyBudget.Entities; public class Income { public int Id { get; private set; } public double Sum { get; private set; } public DateTime Date { get; private set; } public int IncomeCategoryId { get; private set; } public static Income CreateIncome(int id, double sum, int incomeCategoryId) { return new Income { Id = id, Sum = sum, Date = DateTime.Now, IncomeCategoryId = incomeCategoryId }; } }