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

56 lines
1.3 KiB
C#

using System;
using System.ComponentModel.DataAnnotations;
using MapTo;
namespace BlueWest.Data
{
public enum FinanceTransactionTypeEnum
{
ConsumerTypeBuy,
ConsumerTypeDonate,
BusinessIncomePayment,
BankTransferPayment
}
public class FinanceTransactionType
{
[Key] private FinanceTransactionTypeEnum Type;
private string FinanceTransactionTypeDescription;
}
public enum MathOperationType
{
Add,
Sub,
Div,
Mul
}
[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;}
private string FinanceTransactionDescription;
public FinanceTransaction()
{
}
public FinanceTransaction(TimeSpan creationDate, TimeSpan userId,
string currency, FinanceTransactionType financeTransactionType)
{
CreationDate = creationDate;
UserId = userId;
Currency = currency;
}
}
}