32 lines
908 B
C#
32 lines
908 B
C#
using ProjectFamilyBudget.Entities.Enums;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace ProjectFamilyBudget.Entities;
|
|
|
|
public class Income
|
|
{
|
|
public int Id { get; private set; }
|
|
[DisplayName("Тип дохода")]
|
|
public IncomeExpenseType IncomeType { get; private set; }
|
|
[DisplayName("Название")]
|
|
public string Name { get; private set; } = string.Empty;
|
|
[DisplayName("Категория")]
|
|
public string IncomeCategory { get; private set; } = string.Empty;
|
|
|
|
public static Income CreateEntity(int id, IncomeExpenseType incomeType, string name, string incomeCategory)
|
|
{
|
|
return new Income
|
|
{
|
|
Id = id,
|
|
IncomeType = incomeType,
|
|
Name = name,
|
|
IncomeCategory = incomeCategory
|
|
};
|
|
}
|
|
}
|