CodeLiturgy.Dashboard/BlueWest.Data/Finance/FinanceTransaction.cs

49 lines
1.1 KiB
C#

using System;
using System.ComponentModel.DataAnnotations;
using MapTo;
namespace BlueWest.Data
{
public enum FinanceTransactionTypeEnum
{
ConsumerTypeBuy,
ConsumerTypeDonate,
BusinessIncomePayment
}
public class FinanceTransactionType
{
[Key] private FinanceTransactionTypeEnum Type;
private string FinanceTransactionDescription;
}
[MapFrom(typeof(FinanceTransactionInsertDto))]
public partial class FinanceTransaction
{
[Key] public TimeSpan CreationDate { get; set; }
public TimeSpan UserId { get; set; }
public string Currency { get; }
public FinanceTransactionType FinanceTransactionType {get;}
public FinanceTransaction()
{
}
public FinanceTransaction(TimeSpan creationDate, TimeSpan userId,
string currency, FinanceTransactionType financeTransactionType)
{
CreationDate = creationDate;
UserId = userId;
Currency = currency;
}
}
}