27 lines
644 B
C#
27 lines
644 B
C#
|
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 decimal Sum { get; private set; }
|
|||
|
public DateTime Date { get; private set; }
|
|||
|
public int ExpenseCategoryId { get; private set; }
|
|||
|
|
|||
|
public static Expense CreateEntity(int id, decimal sum, int expenseCategoryId)
|
|||
|
{
|
|||
|
return new Expense
|
|||
|
{
|
|||
|
Id = id,
|
|||
|
Sum = sum,
|
|||
|
Date = DateTime.Now,
|
|||
|
ExpenseCategoryId = expenseCategoryId
|
|||
|
};
|
|||
|
}
|
|||
|
}
|