diff --git a/WebApi/DTOs/AnswerDto.cs b/WebApi/DTOs/AnswerDto.cs index 7b7b874..347b2d5 100644 --- a/WebApi/DTOs/AnswerDto.cs +++ b/WebApi/DTOs/AnswerDto.cs @@ -15,8 +15,6 @@ namespace DTOs { public uint Id { get; set; } public string Content { get; set; } = null!; - public uint IdQuestion { get; set; } - - public QuestionDto? Question { get; set; } = null!; + public uint? IdQuestion { get; set; } } } diff --git a/WebApi/DTOs/LobbyDto.cs b/WebApi/DTOs/LobbyDto.cs index 455461b..abec694 100644 --- a/WebApi/DTOs/LobbyDto.cs +++ b/WebApi/DTOs/LobbyDto.cs @@ -15,7 +15,6 @@ namespace DTOs /// Name : name of the lobby /// Password : password require to access at the lobby /// IdCreator : identifier of the creator player - /// Creator : the creator player /// public class LobbyDto { @@ -24,6 +23,5 @@ namespace DTOs public string Password { get; set; } = null!; public uint NbPlayers { get; set; } public uint? IdCreator { get; set; } - public PlayerDto Creator { get; set; } = null!; } } diff --git a/WebApi/DTOs/QuestionDto.cs b/WebApi/DTOs/QuestionDto.cs index 4782752..488616d 100644 --- a/WebApi/DTOs/QuestionDto.cs +++ b/WebApi/DTOs/QuestionDto.cs @@ -17,8 +17,6 @@ namespace DTOs /// NbFails : number of time that people fail on this question /// IdChapter : identifier of the chapter of the question /// IdAnswerGood : identifier of the right answer to this question - /// Chapter : the chapter of the question - /// AnswerGood : the right answer to this question /// public class QuestionDto { @@ -26,9 +24,7 @@ namespace DTOs public string Content { get; set; } = null!; public byte Difficulty { get; set; } public uint NbFalls { get; set; } - public uint? IdChapter { get; set; } + public uint IdChapter { get; set; } public uint? IdAnswerGood { get; set; } - public ChapterDto? Chapter { get; set; } - public AnswerDto? AnswerGood { get; set; } } } diff --git a/WebApi/Entities/AdministratorEntity.cs b/WebApi/Entities/AdministratorEntity.cs index 1cd09d5..c9b2536 100644 --- a/WebApi/Entities/AdministratorEntity.cs +++ b/WebApi/Entities/AdministratorEntity.cs @@ -10,7 +10,7 @@ namespace Entities /// Username : username for a administrator /// HashedPassword : hash of the password of the administrator /// - [Table("Administrators")] + [Table("Administrator")] public class AdministratorEntity { [Key] diff --git a/WebApi/Entities/AnswerEntity.cs b/WebApi/Entities/AnswerEntity.cs index 0d06dc3..deb6e9b 100644 --- a/WebApi/Entities/AnswerEntity.cs +++ b/WebApi/Entities/AnswerEntity.cs @@ -11,7 +11,7 @@ namespace Entities /// IdQuestion : the id of the question which it answer to /// Question : the question which it answer to /// - [Table("Answers")] + [Table("Answer")] public class AnswerEntity { [Key] diff --git a/WebApi/Entities/ChapterEntity.cs b/WebApi/Entities/ChapterEntity.cs index c6289d1..379d1c1 100644 --- a/WebApi/Entities/ChapterEntity.cs +++ b/WebApi/Entities/ChapterEntity.cs @@ -9,7 +9,7 @@ namespace Entities /// Id : identifier in the database /// Name : name of the chapter /// - [Table("Chapters")] + [Table("Chapter")] public class ChapterEntity { [Key] diff --git a/WebApi/Entities/LobbyEntity.cs b/WebApi/Entities/LobbyEntity.cs index 159d05b..9ddcf5b 100644 --- a/WebApi/Entities/LobbyEntity.cs +++ b/WebApi/Entities/LobbyEntity.cs @@ -13,7 +13,7 @@ namespace Entities /// IdCreator : identifier of the creator player /// Creator : the creator player /// - [Table("Lobbies")] + [Table("Lobby")] public class LobbyEntity { [Key] diff --git a/WebApi/Entities/PlayerEntity.cs b/WebApi/Entities/PlayerEntity.cs index 1cb3846..764bc6c 100644 --- a/WebApi/Entities/PlayerEntity.cs +++ b/WebApi/Entities/PlayerEntity.cs @@ -10,7 +10,7 @@ namespace Entities /// Nickname : nickname for the player /// HashedPassword : hashed of the password of the player /// - [Table("Players")] + [Table("Player")] public class PlayerEntity { [Key] diff --git a/WebApi/Entities/QuestionEntity.cs b/WebApi/Entities/QuestionEntity.cs index 5f0d440..f2ef4d3 100644 --- a/WebApi/Entities/QuestionEntity.cs +++ b/WebApi/Entities/QuestionEntity.cs @@ -20,7 +20,7 @@ namespace Entities /// Chapter : the chapter of the question /// AnswerGood : the right answer to this question /// - [Table("Questions")] + [Table("Question")] public class QuestionEntity { [Key] @@ -33,7 +33,7 @@ namespace Entities public uint NbFalls { get; set; } [ForeignKey(nameof(Chapter))] - public uint? IdChapter { get; set; } + public uint IdChapter { get; set; } [ForeignKey(nameof(AnswerGood))] public uint? IdAnswerGood { get; set; }