2024-11-05 17:54:04 +04:00
|
|
|
|
using ProjectFamilyBudget.Entities.Enums;
|
|
|
|
|
using System;
|
2024-10-28 11:18:20 +04:00
|
|
|
|
using System.Collections.Generic;
|
2024-12-15 11:09:07 +04:00
|
|
|
|
using System.ComponentModel;
|
2024-10-28 11:18:20 +04:00
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace ProjectFamilyBudget.Entities;
|
|
|
|
|
|
|
|
|
|
public class Income
|
|
|
|
|
{
|
|
|
|
|
public int Id { get; private set; }
|
2024-12-15 11:09:07 +04:00
|
|
|
|
[DisplayName("Тип дохода")]
|
2024-11-05 17:54:04 +04:00
|
|
|
|
public IncomeExpenseType IncomeType { get; private set; }
|
2024-12-15 11:09:07 +04:00
|
|
|
|
[DisplayName("Название")]
|
2024-11-05 17:54:04 +04:00
|
|
|
|
public string Name { get; private set; } = string.Empty;
|
2024-12-15 11:09:07 +04:00
|
|
|
|
[DisplayName("Категория")]
|
2024-11-05 17:54:04 +04:00
|
|
|
|
public string IncomeCategory { get; private set; } = string.Empty;
|
2024-10-28 11:18:20 +04:00
|
|
|
|
|
2024-11-05 17:54:04 +04:00
|
|
|
|
public static Income CreateEntity(int id, IncomeExpenseType incomeType, string name, string incomeCategory)
|
2024-10-28 11:18:20 +04:00
|
|
|
|
{
|
|
|
|
|
return new Income
|
|
|
|
|
{
|
|
|
|
|
Id = id,
|
2024-11-05 17:54:04 +04:00
|
|
|
|
IncomeType = incomeType,
|
|
|
|
|
Name = name,
|
|
|
|
|
IncomeCategory = incomeCategory
|
2024-10-28 11:18:20 +04:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|