28 lines
760 B
C#
Raw Normal View History

2024-11-05 17:54:04 +04:00
using ProjectFamilyBudget.Entities.Enums;
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; }
2024-11-05 17:54:04 +04:00
public IncomeExpenseType IncomeType { get; private set; }
public string Name { get; private set; } = string.Empty;
public string IncomeCategory { get; private set; } = string.Empty;
2024-11-05 17:54:04 +04:00
public static Income CreateEntity(int id, IncomeExpenseType incomeType, string name, string incomeCategory)
{
return new Income
{
Id = id,
2024-11-05 17:54:04 +04:00
IncomeType = incomeType,
Name = name,
IncomeCategory = incomeCategory
};
}
}