|
@@ -14,36 +14,12 @@ namespace MafiaTelegramBot.DataBase.Entity
|
|
|
public long UserId { get; set; }
|
|
|
[DatabaseGenerated(DatabaseGeneratedOption.None)] [Column("role") , MaxLength(127)]
|
|
|
public string Role { get; set; }
|
|
|
-
|
|
|
- [NotMapped]
|
|
|
- private int _games = 0;
|
|
|
-
|
|
|
+
|
|
|
[Column("games") , MaxLength(127)]
|
|
|
- public int Games
|
|
|
- {
|
|
|
- get=> _games;
|
|
|
- set
|
|
|
- {
|
|
|
- if (_games == value) return;
|
|
|
- _games = value;
|
|
|
- Task.Run(async() => await StatisticsDao.Update(this));
|
|
|
- }
|
|
|
- }
|
|
|
+ public int Games { get; set; } = 0;
|
|
|
|
|
|
- [NotMapped]
|
|
|
- private int _wins = 0;
|
|
|
-
|
|
|
[Column("wins") , MaxLength(127)]
|
|
|
- public int Wins
|
|
|
- {
|
|
|
- get=> _wins;
|
|
|
- set
|
|
|
- {
|
|
|
- if (_wins == value) return;
|
|
|
- _wins = value;
|
|
|
- Task.Run(async() => await StatisticsDao.Update(this));
|
|
|
- }
|
|
|
- }
|
|
|
+ public int Wins { get; set; } = 0;
|
|
|
|
|
|
public double GetWinrate()
|
|
|
{
|