mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-15 01:54:43 +00:00
32 lines
994 B
C#
32 lines
994 B
C#
using Domain.Entities;
|
|
using Features.Breweries.Dtos;
|
|
using MediatR;
|
|
|
|
namespace Features.Breweries.Commands.CreateBrewery;
|
|
|
|
/// <summary>Location details for a brewery being created.</summary>
|
|
/// <param name="Coordinates">Raw binary representation of the brewery's geographic coordinates.</param>
|
|
public record CreateBreweryLocation(
|
|
Guid CityId,
|
|
string AddressLine1,
|
|
string? AddressLine2,
|
|
string PostalCode,
|
|
CoordinateData? Coordinates
|
|
);
|
|
|
|
/// <summary>
|
|
/// Creates a new brewery post. Bound directly from the request body of <c>POST /api/brewery</c>.
|
|
/// </summary>
|
|
public record CreateBreweryCommand(
|
|
Guid PostedById,
|
|
string BreweryName,
|
|
string Description,
|
|
CreateBreweryLocation Location
|
|
) : IRequest<BreweryDto>;
|
|
|
|
/// <summary>Request body for <c>POST /api/brewery</c>. <c>PostedById</c> comes from the caller's JWT.</summary>
|
|
public record CreateBreweryRequest(
|
|
string BreweryName,
|
|
string Description,
|
|
CreateBreweryLocation Location
|
|
); |