28 lines
638 B
C#
28 lines
638 B
C#
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; }
|
|
public decimal Sum { get; private set; }
|
|
public DateTime Date { get; private set; }
|
|
public int IncomeCategoryId { get; private set; }
|
|
|
|
public static Income CreateEntity(int id, decimal sum, int incomeCategoryId)
|
|
{
|
|
return new Income
|
|
{
|
|
Id = id,
|
|
Sum = sum,
|
|
Date = DateTime.Now,
|
|
IncomeCategoryId = incomeCategoryId
|
|
};
|
|
}
|
|
|
|
}
|