using System; using MapTo; using MessagePack; namespace BlueWest.Data { public enum FinanceSymbol { BTC_EUR, BTC_BUSD, BTC_USD, BTC_USDT, LTC_EUR, LTC_BUSD, LTC_USDT } public enum FinanceTransactionType { Buy, Sell } [MessagePackObject] public partial struct FinanceTransaction { [Key(1)] public int Id { get; set; } [Key(2)] public int UserId { get; set; } [Key(3)] public FinanceTransactionType FinanceTransactionType { get; } [Key(4)] public FinanceSymbol FinanceSymbol { 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 DateTime DateTime { get; } public FinanceTransaction(int id, int userId, FinanceTransactionType financeTransactionType, FinanceSymbol financeSymbol, double amount, double quantity, double fee, DateTime dateTime) { Id = id; UserId = userId; FinanceTransactionType = financeTransactionType; FinanceSymbol = financeSymbol; Amount = amount; Quantity = quantity; Fee = fee; DateTime = dateTime; } } }