DTOs for index mostly done, doing DB models
This commit is contained in:
52
SVSim.EmulatedEntrypoint/Models/Dtos/UserCurrency.cs
Normal file
52
SVSim.EmulatedEntrypoint/Models/Dtos/UserCurrency.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using MessagePack;
|
||||
using SVSim.Database.Models;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos;
|
||||
|
||||
[MessagePackObject]
|
||||
public class UserCurrency
|
||||
{
|
||||
[Key("viewer_id")]
|
||||
public ulong ViewerId { get; set; }
|
||||
[Key("crystal")]
|
||||
public ulong Crystals { get; set; }
|
||||
[Key("crystal_android")]
|
||||
public ulong AndroidCrystals { get; set; }
|
||||
[Key("crystal_ios")]
|
||||
public ulong IosCrystals { get; set; }
|
||||
[Key("crystal_steam")]
|
||||
public ulong SteamCrystals { get; set; }
|
||||
[Key("crystal_dmm")]
|
||||
public ulong DmmCrystals { get; set; }
|
||||
[Key("free_crystal")]
|
||||
public ulong FreeCrystals { get; set; }
|
||||
[Key("total_crystal")]
|
||||
public ulong TotalCrystals { get; set; }
|
||||
[Key("life_total_crystal")]
|
||||
public ulong LifeTotalCrystals { get; set; }
|
||||
[Key("red_ether")]
|
||||
public ulong RedEther { get; set; }
|
||||
[Key("rupy")]
|
||||
public ulong Rupees { get; set; }
|
||||
|
||||
public UserCurrency()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public UserCurrency(Viewer viewer)
|
||||
{
|
||||
ViewerCurrency currency = viewer.Currency;
|
||||
this.Crystals = currency.Crystals;
|
||||
this.RedEther = currency.RedEther;
|
||||
this.LifeTotalCrystals = currency.LifeTotalCrystals;
|
||||
this.TotalCrystals = currency.LifeTotalCrystals;
|
||||
this.Rupees = currency.Rupees;
|
||||
this.FreeCrystals = currency.FreeCrystals;
|
||||
this.AndroidCrystals = currency.AndroidCrystals;
|
||||
this.DmmCrystals = currency.DmmCrystals;
|
||||
this.SteamCrystals = currency.SteamCrystals;
|
||||
this.IosCrystals = currency.IosCrystals;
|
||||
this.ViewerId = viewer.Id;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user