PIBD-23_Fomichev_V.S._Famil.../ProjectFamilyBudget/Entities/Expense.cs

28 lines
770 B
C#

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 Expense
{
public int Id { get; private set; }
public IncomeExpenseType ExpenseType { get; private set; }
public string Name { get; private set; } = string.Empty;
public string ExpenseCategory { get; private set; } = string.Empty;
public static Expense CreateEntity(int id,IncomeExpenseType expenseType, string name, string expenseCategory)
{
return new Expense
{
Id = id,
ExpenseType = expenseType,
Name = name,
ExpenseCategory = expenseCategory
};
}
}