Add game and game detail dtos

This commit is contained in:
Maxime Adler
2025-04-17 12:49:31 +02:00
parent d90811723a
commit e192df49e7
12 changed files with 52 additions and 34 deletions

View File

@@ -4,7 +4,7 @@ namespace GameIdeas.BlazorApp.Helpers;
public static class GameHelper
{
public static void WriteTrackingDto(GameDto game)
public static void WriteTrackingDto(GameDetailDto game)
{
game.CreationUserId = 100000;
game.CreationDate = DateTime.Now;

View File

@@ -18,7 +18,7 @@ public partial class GameCreationForm
[Parameter] public CategoriesDto? Categories { get; set; }
[Parameter] public EventCallback OnSubmit { get; set; }
private GameDto GameDto = new();
private GameDetailDto GameDto = new();
private EditContext? EditContext;
private readonly SelectTheme Theme = SelectTheme.Creation;
private readonly SliderParams SliderParams = new() { Gap = 1, Min = 1, Max = 5 };

View File

@@ -4,7 +4,7 @@ using GameIdeas.Shared.Dto;
namespace GameIdeas.BlazorApp.Pages.Games.Components;
public class GameValidation : AbstractValidator<GameDto>
public class GameValidation : AbstractValidator<GameDetailDto>
{
public GameValidation()
{

View File

@@ -8,7 +8,7 @@ namespace GameIdeas.BlazorApp.Pages.Games.Gateways;
public class GameGateway(IHttpClientService httpClientService) : IGameGateway
{
public async Task<int> CreateGame(GameDto game)
public async Task<int> CreateGame(GameDetailDto game)
{
try
{

View File

@@ -5,6 +5,6 @@ namespace GameIdeas.BlazorApp.Pages.Games.Gateways;
public interface IGameGateway
{
Task<CategoriesDto> FetchCategories();
Task<int> CreateGame(GameDto game);
Task<int> CreateGame(GameDetailDto game);
Task<IEnumerable<GameDto>> FetchGames(PaggingDto pagging);
}