perf : modification des classes
continuous-integration/drone/push Build is passing Details

API
Damien NORTIER 1 year ago
parent 672ef9db67
commit 8009f0f977

@ -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; }
}
}

@ -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
/// </summary>
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!;
}
}

@ -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
/// </summary>
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; }
}
}

@ -10,7 +10,7 @@ namespace Entities
/// Username : username for a administrator
/// HashedPassword : hash of the password of the administrator
/// </summary>
[Table("Administrators")]
[Table("Administrator")]
public class AdministratorEntity
{
[Key]

@ -11,7 +11,7 @@ namespace Entities
/// IdQuestion : the id of the question which it answer to
/// Question : the question which it answer to
/// </summary>
[Table("Answers")]
[Table("Answer")]
public class AnswerEntity
{
[Key]

@ -9,7 +9,7 @@ namespace Entities
/// Id : identifier in the database
/// Name : name of the chapter
/// </summary>
[Table("Chapters")]
[Table("Chapter")]
public class ChapterEntity
{
[Key]

@ -13,7 +13,7 @@ namespace Entities
/// IdCreator : identifier of the creator player
/// Creator : the creator player
/// </summary>
[Table("Lobbies")]
[Table("Lobby")]
public class LobbyEntity
{
[Key]

@ -10,7 +10,7 @@ namespace Entities
/// Nickname : nickname for the player
/// HashedPassword : hashed of the password of the player
/// </summary>
[Table("Players")]
[Table("Player")]
public class PlayerEntity
{
[Key]

@ -20,7 +20,7 @@ namespace Entities
/// Chapter : the chapter of the question
/// AnswerGood : the right answer to this question
/// </summary>
[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; }

Loading…
Cancel
Save