Add news type enumeration.

This commit is contained in:
2018-04-12 22:28:26 +01:00
parent 381a943918
commit b033365d5a
2 changed files with 15 additions and 2 deletions

View File

@@ -284,7 +284,7 @@ namespace Cicm.Database
{
Id = int.Parse(dataRow["id"].ToString()),
Date = dataRow["date"].ToString(),
Type = int.Parse(dataRow["type"].ToString()),
Type = (NewsType)int.Parse(dataRow["type"].ToString()),
AffectedId = int.Parse(dataRow["added_id"].ToString())
};

View File

@@ -40,6 +40,19 @@ namespace Cicm.Database.Schemas
/// <summary>ID</summary>
public int Id;
/// <summary>News type</summary>
public int Type;
public NewsType Type;
}
public enum NewsType : int
{
NewComputerInDb = 1,
NewConsoleInDb = 2,
NewComputerInCollection = 3,
NewConsoleInCollection = 4,
UpdatedComputerInDb = 5,
UpdatedConsoleInDb = 6,
UpdatedComputerInCollection = 7,
UpdatedConsoleInCollection = 8,
NewMoneyDonation = 9
}
}