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

36 lines
1.1 KiB
C#

using System;
using MapTo;
using MessagePack;
namespace BlueWest.Data
{
[MessagePackObject]
[MapFrom(typeof(FinanceTransactionInsertDto))]
public partial struct FinanceTransaction
{
[Key(1)] public TimeSpan CreationDate { get; set; }
[Key(2)] public TimeSpan UserId { get; set; }
[Key(4)] public string Currency { get; }
[Key(5)] public double Amount { get; } // To Buy
[Key(6)] public double Quantity { get; } // Bought
[Key(7)] public double Fee { get; }
[Key(8)] public TimeSpan UploadedDate { get; }
[Key(9)] public TimeSpan TransactionDate { get; }
public FinanceTransaction(TimeSpan creationDate, TimeSpan userId,
string currency, double amount, double quantity, double fee, TimeSpan uploadedDate, TimeSpan transactionDate)
{
CreationDate = creationDate;
UserId = userId;
Amount = amount;
Quantity = quantity;
Fee = fee;
Currency = currency;
UploadedDate = uploadedDate;
TransactionDate = transactionDate;
}
}
}