This commit is contained in:
parent
fe5cb587ac
commit
37abe825d2
|
@ -4,10 +4,11 @@
|
|||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
|
||||
<RootNamespace>BlueWest.Data</RootNamespace>
|
||||
<AnalysisLevel>preview</AnalysisLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MapTo" Version="0.8.4" />
|
||||
<PackageReference Include="MapTo" Version="0.8.7" />
|
||||
<PackageReference Include="MessagePack" Version="2.3.85" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="6.0.4" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -9,19 +9,19 @@ namespace BlueWest.Data
|
|||
{
|
||||
[MessagePackObject]
|
||||
[MapFrom(typeof(UserUpdateDto))]
|
||||
public partial class User : DataObject
|
||||
public partial struct User
|
||||
{
|
||||
[Key(1)]public int Id { get; } = -1;
|
||||
[Key(2)]public string Name { get; set; } = "";
|
||||
[Key(3)]public string Address { get; set; } = "";
|
||||
[Key(1)]public int Id { get; }
|
||||
[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(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;
|
||||
[Key(6)]public double BTCAmount { get; set; }
|
||||
[Key(7)]public double LTCAmount { get; set; }
|
||||
|
||||
[IgnoreProperty] [Key(8)] public List<FinanceTransaction> FinanceTransactions { get; set; }
|
||||
[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)
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace BlueWest.Data
|
|||
{
|
||||
[MapFrom(typeof(User))]
|
||||
|
||||
public partial class UserUpdateDto
|
||||
public partial struct UserUpdateDto
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Address { get; set; }
|
||||
|
|
Loading…
Reference in New Issue