43 lines
1.2 KiB
C#
43 lines
1.2 KiB
C#
|
|
|||
|
using System.Collections.Generic;
|
|||
|
using BlueWest.Collections;
|
|||
|
using MapTo;
|
|||
|
using MessagePack;
|
|||
|
using Newtonsoft.Json;
|
|||
|
|
|||
|
namespace BlueWest.Data
|
|||
|
{
|
|||
|
[MessagePackObject]
|
|||
|
[MapFrom(typeof(UserUpdateDto))]
|
|||
|
public partial class User : DataObject
|
|||
|
{
|
|||
|
[Key(1)]public int Id { get; set; } = -1;
|
|||
|
[Key(2)]public string Name { get; set; } = "";
|
|||
|
[Key(3)]public string Address { get; set; } = "";
|
|||
|
|
|||
|
[Key(4)]public string BTCAddress { get; set; } = "";
|
|||
|
[Key(5)]public string LTCAddress { get; set; } = "";
|
|||
|
|
|||
|
[Key(6)]public double BTCAmount { get; set; } = 0;
|
|||
|
[Key(7)]public double LTCAmount { get; set; } = 0;
|
|||
|
|
|||
|
[IgnoreProperty]
|
|||
|
[Key(8)] public List<FinanceTransaction> FinanceTransactions { get; set; }
|
|||
|
|
|||
|
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;
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
|