mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-23 19:30:06 +02:00
Saving accounts To DB
This commit is contained in:
1 parent
31b067e087
commit
ddbf42e7bb
14 files changed
+372
-54
No files matched your search
@@ -1,21 +1,40 @@
|
||||
namespace WotBlitzStatisticsPro.DataAccess.Model.Accounts
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
|
||||
namespace WotBlitzStatisticsPro.DataAccess.Model.Accounts
|
||||
{
|
||||
public class TankInfoHistory
|
||||
{
|
||||
///<summary>
|
||||
/// Player account identifier
|
||||
///</summary>
|
||||
public long AccountId { get; set; }
|
||||
|
||||
///<summary>
|
||||
/// Tank identifier
|
||||
///</summary>
|
||||
public long TankId { get; set; }
|
||||
public TankInfoHistory()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public TankInfoHistory(long accountId, long tankId, int lastBattleTime)
|
||||
{
|
||||
TankInfoHistoryId = new TankInfoHistoryKey(accountId, tankId, lastBattleTime);
|
||||
}
|
||||
|
||||
[BsonId]
|
||||
public TankInfoHistoryKey TankInfoHistoryId { get; set; }
|
||||
|
||||
///<summary>
|
||||
/// Player account identifier
|
||||
///</summary>
|
||||
[BsonIgnore]
|
||||
public long AccountId => TankInfoHistoryId.AccountId;
|
||||
|
||||
///<summary>
|
||||
/// Tank identifier
|
||||
///</summary>
|
||||
[BsonIgnore]
|
||||
public long TankId => TankInfoHistoryId.TankId;
|
||||
|
||||
///<summary>
|
||||
/// Last battle
|
||||
///</summary>
|
||||
public int LastBattleTime { get; set; }
|
||||
[BsonIgnore]
|
||||
public int LastBattleTime => TankInfoHistoryId.LastBattleTime;
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user