2021-12-06 02:49:27 +03:00
|
|
|
|
using System;
|
2021-12-06 19:08:31 +03:00
|
|
|
|
using MapTo;
|
2021-12-06 02:49:27 +03:00
|
|
|
|
using MessagePack;
|
|
|
|
|
|
|
|
|
|
namespace BlueWest.Data
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
[MessagePackObject]
|
2021-12-10 03:04:48 +03:00
|
|
|
|
[MapFrom(typeof(FinanceTransactionInsertDto))]
|
2021-12-06 19:27:46 +03:00
|
|
|
|
public partial struct FinanceTransaction
|
2021-12-06 02:49:27 +03:00
|
|
|
|
{
|
2022-08-01 00:09:39 +03:00
|
|
|
|
[Key(1)] public TimeSpan CreationDate { get; set; }
|
|
|
|
|
[Key(2)] public TimeSpan UserId { get; set; }
|
|
|
|
|
|
|
|
|
|
[Key(4)] public string Currency { get; }
|
2021-12-06 02:49:27 +03:00
|
|
|
|
[Key(5)] public double Amount { get; } // To Buy
|
|
|
|
|
[Key(6)] public double Quantity { get; } // Bought
|
|
|
|
|
[Key(7)] public double Fee { get; }
|
2022-08-01 00:09:39 +03:00
|
|
|
|
[Key(8)] public TimeSpan UploadedDate { get; }
|
|
|
|
|
[Key(9)] public TimeSpan TransactionDate { get; }
|
2021-12-06 02:49:27 +03:00
|
|
|
|
|
|
|
|
|
|
2022-08-01 00:09:39 +03:00
|
|
|
|
public FinanceTransaction(TimeSpan creationDate, TimeSpan userId,
|
|
|
|
|
string currency, double amount, double quantity, double fee, TimeSpan uploadedDate, TimeSpan transactionDate)
|
2021-12-06 02:49:27 +03:00
|
|
|
|
{
|
2022-08-01 00:09:39 +03:00
|
|
|
|
CreationDate = creationDate;
|
2021-12-06 02:49:27 +03:00
|
|
|
|
UserId = userId;
|
|
|
|
|
Amount = amount;
|
|
|
|
|
Quantity = quantity;
|
|
|
|
|
Fee = fee;
|
2022-08-01 00:09:39 +03:00
|
|
|
|
Currency = currency;
|
|
|
|
|
UploadedDate = uploadedDate;
|
|
|
|
|
TransactionDate = transactionDate;
|
2021-12-06 02:49:27 +03:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|