fixes and tweaks
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Lutra.API.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the data required to create a verspakket.
|
||||
/// </summary>
|
||||
public sealed record CreateVerspakketRequest(
|
||||
[Required, MaxLength(50)] string Naam,
|
||||
[Range(0, int.MaxValue)] int? PrijsInCenten,
|
||||
[Range(1, 10)] int AantalPersonen,
|
||||
[Required] Guid SupermarktId,
|
||||
AddBeoordelingRequest? Beoordeling = null,
|
||||
IReadOnlyList<VerspakketFotoRequest>? Fotos = null);
|
||||
@@ -9,4 +9,7 @@ public sealed record UpdateVerspakketRequest(
|
||||
[Required, MaxLength(50)] string Naam,
|
||||
[Range(0, int.MaxValue)] int PrijsInCenten,
|
||||
[Range(1, 10)] int AantalPersonen,
|
||||
[Required] Guid SupermarktId);
|
||||
[Required] Guid SupermarktId,
|
||||
IReadOnlyList<VerspakketFotoRequest>? Fotos = null);
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Lutra.API.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a foto in a request, encoded as base64.
|
||||
/// </summary>
|
||||
public sealed record VerspakketFotoRequest(
|
||||
[Required] string Base64Data,
|
||||
bool IsMainImage);
|
||||
Reference in New Issue
Block a user