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))]
public partial struct User
{
public int Id { get; }
public string Name { get; set; }
public string Address { get; set; }
public string BTCAddress { get; set; }
public string LTCAddress { get; set; }
public double BTCAmount { get; set; }
public double LTCAmount { get; set; }
2021-12-10 03:04:41 +03:00
public List<FinanceTransaction> FinanceTransactions { get; }
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);
}
}
}