diff --git a/WebApi/DTOs/AdministratorDto.cs b/WebApi/DTOs/AdministratorDto.cs
index 6c6c1de..a2a4505 100644
--- a/WebApi/DTOs/AdministratorDto.cs
+++ b/WebApi/DTOs/AdministratorDto.cs
@@ -16,7 +16,7 @@ namespace DTOs
///
public class AdministratorDto
{
- public uint Id { get; set; }
+ public int Id { get; set; }
public string Username { get; set; } = null!;
public string HashedPassword { get; set; } = null!;
}
diff --git a/WebApi/DTOs/AnswerDto.cs b/WebApi/DTOs/AnswerDto.cs
index 347b2d5..fb75004 100644
--- a/WebApi/DTOs/AnswerDto.cs
+++ b/WebApi/DTOs/AnswerDto.cs
@@ -13,8 +13,8 @@ namespace DTOs
///
public class AnswerDto
{
- public uint Id { get; set; }
+ public int Id { get; set; }
public string Content { get; set; } = null!;
- public uint? IdQuestion { get; set; }
+ public int? IdQuestion { get; set; }
}
}
diff --git a/WebApi/DTOs/ChapterDto.cs b/WebApi/DTOs/ChapterDto.cs
index 739f5eb..8c5fa02 100644
--- a/WebApi/DTOs/ChapterDto.cs
+++ b/WebApi/DTOs/ChapterDto.cs
@@ -15,7 +15,7 @@ namespace DTOs
///
public class ChapterDto
{
- public uint Id { get; set; }
+ public int Id { get; set; }
public string Name { get; set; } = null!;
}
}
diff --git a/WebApi/DTOs/LobbyDto.cs b/WebApi/DTOs/LobbyDto.cs
index abec694..015b224 100644
--- a/WebApi/DTOs/LobbyDto.cs
+++ b/WebApi/DTOs/LobbyDto.cs
@@ -18,10 +18,10 @@ namespace DTOs
///
public class LobbyDto
{
- public uint Id { get; set; }
+ public int Id { get; set; }
public string Name { get; set; } = null!;
public string Password { get; set; } = null!;
- public uint NbPlayers { get; set; }
- public uint? IdCreator { get; set; }
+ public int NbPlayers { get; set; }
+ public int? IdCreator { get; set; }
}
}
diff --git a/WebApi/DTOs/PlayerDto.cs b/WebApi/DTOs/PlayerDto.cs
index 30e86f6..6b4a26b 100644
--- a/WebApi/DTOs/PlayerDto.cs
+++ b/WebApi/DTOs/PlayerDto.cs
@@ -16,7 +16,7 @@ namespace DTOs
///
public class PlayerDto
{
- public uint Id { get; set; }
+ public int Id { get; set; }
public string Nickname { get; set; } = null!;
public string HashedPassword { get; set; } = null!;
}
diff --git a/WebApi/DTOs/QuestionDto.cs b/WebApi/DTOs/QuestionDto.cs
index 488616d..5a5e33f 100644
--- a/WebApi/DTOs/QuestionDto.cs
+++ b/WebApi/DTOs/QuestionDto.cs
@@ -20,11 +20,11 @@ namespace DTOs
///
public class QuestionDto
{
- public uint Id { get; set; }
+ public int Id { get; set; }
public string Content { get; set; } = null!;
public byte Difficulty { get; set; }
- public uint NbFalls { get; set; }
- public uint IdChapter { get; set; }
- public uint? IdAnswerGood { get; set; }
+ public int NbFalls { get; set; }
+ public int IdChapter { get; set; }
+ public int? IdAnswerGood { get; set; }
}
}
diff --git a/WebApi/Entities/AdministratorEntity.cs b/WebApi/Entities/AdministratorEntity.cs
index c9b2536..969c6fa 100644
--- a/WebApi/Entities/AdministratorEntity.cs
+++ b/WebApi/Entities/AdministratorEntity.cs
@@ -15,7 +15,7 @@ namespace Entities
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public uint Id { get; set; }
+ public int Id { get; set; }
[Required]
public string Username { get; set; } = null!;
[Required]
diff --git a/WebApi/Entities/AnswerEntity.cs b/WebApi/Entities/AnswerEntity.cs
index deb6e9b..a8f92e8 100644
--- a/WebApi/Entities/AnswerEntity.cs
+++ b/WebApi/Entities/AnswerEntity.cs
@@ -16,12 +16,12 @@ namespace Entities
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public uint Id { get; set; }
+ public int Id { get; set; }
[Required]
public string Content { get; set; } = null!;
[ForeignKey(nameof(Question))]
- public uint? IdQuestion { get; set; }
+ public int? IdQuestion { get; set; }
public QuestionEntity? Question { get; set; }
}
diff --git a/WebApi/Entities/ChapterEntity.cs b/WebApi/Entities/ChapterEntity.cs
index 379d1c1..6d78723 100644
--- a/WebApi/Entities/ChapterEntity.cs
+++ b/WebApi/Entities/ChapterEntity.cs
@@ -14,7 +14,7 @@ namespace Entities
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public uint Id { get; set; }
+ public int Id { get; set; }
[Required]
public string Name { get; set; } = null!;
}
diff --git a/WebApi/Entities/LobbyEntity.cs b/WebApi/Entities/LobbyEntity.cs
index 9ddcf5b..3fbd264 100644
--- a/WebApi/Entities/LobbyEntity.cs
+++ b/WebApi/Entities/LobbyEntity.cs
@@ -18,14 +18,14 @@ namespace Entities
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public uint Id { get; set; }
+ public int Id { get; set; }
[Required]
public string Name { get; set; } = null!;
public string Password { get; set; } = null!;
- public uint NbPlayers { get; set; }
+ public int NbPlayers { get; set; }
[ForeignKey(nameof(Creator))]
- public uint? IdCreator { get; set; }
+ public int? IdCreator { get; set; }
public PlayerEntity? Creator { get; set; }
}
diff --git a/WebApi/Entities/LobbyEntityPlayerEntity.cs b/WebApi/Entities/LobbyEntityPlayerEntity.cs
index 271d093..1150c67 100644
--- a/WebApi/Entities/LobbyEntityPlayerEntity.cs
+++ b/WebApi/Entities/LobbyEntityPlayerEntity.cs
@@ -14,14 +14,14 @@ namespace Entities
public class LobbyEntityPlayerEntity
{
[ForeignKey(nameof(Lobby))]
- public uint IdLobby { get; set; }
+ public int IdLobby { get; set; }
[ForeignKey(nameof(Player))]
- public uint IdPlayer { get; set; }
+ public int IdPlayer { get; set; }
public LobbyEntity Lobby { get; set; } = null!;
public PlayerEntity Player { get; set; } = null!;
- public uint MaxScore { get; set; }
+ public int MaxScore { get; set; }
}
}
diff --git a/WebApi/Entities/PlayerEntity.cs b/WebApi/Entities/PlayerEntity.cs
index 764bc6c..5dda62c 100644
--- a/WebApi/Entities/PlayerEntity.cs
+++ b/WebApi/Entities/PlayerEntity.cs
@@ -15,7 +15,7 @@ namespace Entities
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public uint Id { get; set; }
+ public int Id { get; set; }
[Required]
public string Nickname { get; set; } = null!;
[Required]
diff --git a/WebApi/Entities/PlayerEntityChapterEntity.cs b/WebApi/Entities/PlayerEntityChapterEntity.cs
index 25a23ac..9f73ad0 100644
--- a/WebApi/Entities/PlayerEntityChapterEntity.cs
+++ b/WebApi/Entities/PlayerEntityChapterEntity.cs
@@ -21,16 +21,16 @@ namespace Entities
{
[ForeignKey(nameof(Chapter))]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
- public uint IdChapter { get; set; }
+ public int IdChapter { get; set; }
[ForeignKey(nameof(Player))]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
- public uint IdPlayer { get; set; }
+ public int IdPlayer { get; set; }
public ChapterEntity Chapter { get; set; } = null!;
public PlayerEntity Player { get; set; } = null!;
- public uint MaxScore { get; set; }
+ public int MaxScore { get; set; }
}
}
diff --git a/WebApi/Entities/QuestionEntity.cs b/WebApi/Entities/QuestionEntity.cs
index f2ef4d3..faf3937 100644
--- a/WebApi/Entities/QuestionEntity.cs
+++ b/WebApi/Entities/QuestionEntity.cs
@@ -25,18 +25,18 @@ namespace Entities
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public uint Id { get; set; }
+ public int Id { get; set; }
[Required]
public string Content { get; set; } = null!;
[AllowedValues(1, 2, 3)]
public byte Difficulty { get; set; }
- public uint NbFalls { get; set; }
+ public int NbFalls { get; set; }
[ForeignKey(nameof(Chapter))]
- public uint IdChapter { get; set; }
+ public int IdChapter { get; set; }
[ForeignKey(nameof(AnswerGood))]
- public uint? IdAnswerGood { get; set; }
+ public int? IdAnswerGood { get; set; }
public ChapterEntity? Chapter { get; set; }
diff --git a/WebApi/Model/Administrator.cs b/WebApi/Model/Administrator.cs
index d7e80dd..b845d9d 100644
--- a/WebApi/Model/Administrator.cs
+++ b/WebApi/Model/Administrator.cs
@@ -16,11 +16,11 @@ namespace Model
///
public class Administrator
{
- private uint id;
+ private int id;
private string? username;
private string? hashedPassword;
// getters and setters for attributes
- public uint Id
+ public int Id
{
get => id;
private set { id = value; }
@@ -42,7 +42,7 @@ namespace Model
/// the username of the administrator
/// the hash of the password of the administrator
/// the id in the database
- public Administrator(string username, string hashedPassword, uint id = 0)
+ public Administrator(string username, string hashedPassword, int id = 0)
{
this.Username = username;
this.HashedPassword = hashedPassword;
diff --git a/WebApi/Model/Answer.cs b/WebApi/Model/Answer.cs
index e3705b8..49c0c1c 100644
--- a/WebApi/Model/Answer.cs
+++ b/WebApi/Model/Answer.cs
@@ -12,12 +12,12 @@ namespace Model
///
public class Answer
{
- private uint id;
+ private int id;
private string? content;
- private uint? idQuestion;
+ private int? idQuestion;
// getters and setters for attributes
- public uint Id
+ public int Id
{
get => id;
private set { id = value; }
@@ -27,7 +27,7 @@ namespace Model
get => content == null ? "" : content;
set { content = value == "" ? null : value; }
}
- public uint? IdQuestion
+ public int? IdQuestion
{
get => idQuestion; // null = no idQuestion
set { idQuestion = value; }
@@ -39,7 +39,7 @@ namespace Model
/// the content of the answer
/// the id of the question which it answer to
/// the id in the database
- public Answer(string content, uint? idQuestion = null, uint id = 0)
+ public Answer(string content, int? idQuestion = null, int id = 0)
{
Content = content;
IdQuestion = idQuestion;
diff --git a/WebApi/Model/Chapter.cs b/WebApi/Model/Chapter.cs
index 3c1662f..4ec95a1 100644
--- a/WebApi/Model/Chapter.cs
+++ b/WebApi/Model/Chapter.cs
@@ -15,10 +15,10 @@ namespace Model
///
public class Chapter
{
- uint id;
+ int id;
string? name;
// getters and setters for attributs
- public uint Id
+ public int Id
{
get => id;
private set { id = value; }
@@ -34,7 +34,7 @@ namespace Model
///
/// name of the chapter
/// id in the database
- public Chapter(string name, uint id = 0)
+ public Chapter(string name, int id = 0)
{
Name = name;
Id = id;
diff --git a/WebApi/Model/Lobby.cs b/WebApi/Model/Lobby.cs
index b399a18..3fde81a 100644
--- a/WebApi/Model/Lobby.cs
+++ b/WebApi/Model/Lobby.cs
@@ -18,13 +18,13 @@ namespace Model
///
public class Lobby
{
- private uint id;
+ private int id;
private string? name;
private string? password;
- private uint nbPlayers;
- private uint? idCreator;
+ private int nbPlayers;
+ private int? idCreator;
// getters and setters of attributes
- public uint Id
+ public int Id
{
get => id;
private set { id = value; }
@@ -39,12 +39,12 @@ namespace Model
get => password == null ? "" : password;
private set { password = value == "" ? null : value; }
}
- public uint NbPlayers
+ public int NbPlayers
{
get => nbPlayers;
set { nbPlayers = value; }
}
- public uint? IdCreator
+ public int? IdCreator
{
get => idCreator;
private set { idCreator = value; }
@@ -58,7 +58,7 @@ namespace Model
/// the password require to access to the lobby
/// the number of players in the lobby
/// the id of the lobby
- public Lobby(string name, uint? idCreator, string password = "", uint nbPlayers = 0, uint id = 0)
+ public Lobby(string name, int? idCreator, string password = "", int nbPlayers = 0, int id = 0)
{
Name = name;
IdCreator = idCreator;
diff --git a/WebApi/Model/Player.cs b/WebApi/Model/Player.cs
index 92382f5..033e301 100644
--- a/WebApi/Model/Player.cs
+++ b/WebApi/Model/Player.cs
@@ -16,12 +16,12 @@ namespace Model
///
public class Player
{
- private uint id;
+ private int id;
private string? nickname;
private string? hashedPassword;
// getters and setters for attributes
- public uint Id
+ public int Id
{
get => id;
private set { id = value; }
@@ -43,7 +43,7 @@ namespace Model
/// nickname of the player
/// hash of the password of the player
/// id of the player
- public Player(string nickname, string hashedPassword = "", uint id = 0)
+ public Player(string nickname, string hashedPassword = "", int id = 0)
{
Nickname = nickname;
HashedPassword = hashedPassword;
diff --git a/WebApi/Model/Question.cs b/WebApi/Model/Question.cs
index c84c4c6..7bf667a 100644
--- a/WebApi/Model/Question.cs
+++ b/WebApi/Model/Question.cs
@@ -20,14 +20,14 @@ namespace Model
///
public class Question
{
- private uint id;
+ private int id;
private string? content;
private byte difficulty;
- private uint nbFalls;
- private uint idChapter;
- private uint? idAnswerGood;
+ private int nbFalls;
+ private int idChapter;
+ private int? idAnswerGood;
- public uint Id
+ public int Id
{
get => id;
private set { id = value; }
@@ -42,23 +42,23 @@ namespace Model
get => difficulty;
set { difficulty = value; }
}
- public uint NbFalls
+ public int NbFalls
{
get => nbFalls;
set { nbFalls = value; }
}
- public uint IdChapter
+ public int IdChapter
{
get => idChapter;
private set { idChapter = value; }
}
- public uint? IdAnswerGood
+ public int? IdAnswerGood
{
get => idAnswerGood;
set { idAnswerGood = value; }
}
- public Question(string content, uint idChapter, uint id = 0, uint? idAnswerGood = null)
+ public Question(string content, int idChapter, int id = 0, int? idAnswerGood = null)
{
Id = id;
Content = content;