Add updatetime to rank entries

This commit is contained in:
2021-11-07 00:43:38 -04:00
parent 6f591af5ae
commit aa3a2cb4f4
6 changed files with 1160 additions and 1 deletions

View File

@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
@@ -17,6 +18,7 @@ namespace TOOHUCardAPI.Data.Models
public string Version { get; set; }
public int Wave { get; set; }
public long Damage { get; set; }
public DateTime UpdateTime { get; set; }
public List<RankTowerEntry> TowersUsed { get; set; }
}
}

View File

@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
@@ -45,7 +46,8 @@ namespace TOOHUCardAPI.Data.Services
Version = entry.Version,
Wave = entry.Wave,
Damage = entry.Damage,
TowersUsed = towersUsed
TowersUsed = towersUsed,
UpdateTime = DateTime.Now
};
await _rankRepository.InsertRankEntry(toUpload);
_logger.LogInformation("Uploaded a rank entry for {SteamId}", entry.SteamId);