MapTo/test/TestConsoleApp/Data/User.cs

44 lines
1.1 KiB
C#
Raw Normal View History

2021-12-08 21:20:51 +03:00

using System.Collections.Generic;
using MapTo;
namespace BlueWest.Data
{
[MapFrom(typeof(UserUpdateDto))]
2021-12-11 17:22:26 +03:00
public partial class User
2021-12-08 21:20:51 +03:00
{
2021-12-12 02:54:21 +03:00
public readonly int Id;
public string Name;
public string Address;
2021-12-08 21:20:51 +03:00
2021-12-12 02:54:21 +03:00
public string BTCAddress;
public string LTCAddress;
2021-12-08 21:20:51 +03:00
2021-12-12 02:54:21 +03:00
public double BTCAmount;
public double LTCAmount;
public readonly List<FinanceTransaction> FinanceTransactions;
2021-12-08 21:20:51 +03:00
public User(int id, string name, string address, string btcAddress, string ltcAddress, double btcAmount, double ltcAmount, List<FinanceTransaction> financeTransactions)
{
Id = id;
Name = name;
Address = address;
BTCAddress = btcAddress;
LTCAddress = ltcAddress;
BTCAmount = btcAmount;
LTCAmount = ltcAmount;
FinanceTransactions = financeTransactions;
}
public void AddTransaction(FinanceTransaction financeTransaction)
{
FinanceTransactions.Add(financeTransaction);
}
}
}