using Domain.Entities;
using Features.Breweries.Dtos;
using MediatR;
namespace Features.Breweries.Commands.UpdateBrewery;
///
/// Describes the location supplied when updating a brewery.
///
///
/// Identifies the existing location; a new location is created when needed.
///
///
/// Serialized geographic coordinates for the brewery.
///
public record UpdateBreweryLocation(
Guid BreweryPostLocationId,
Guid CityId,
string AddressLine1,
string? AddressLine2,
string PostalCode,
CoordinateData? Coordinates
);
///
/// Represents a concurrency-protected change to an existing brewery post.
/// A removes the existing location.
///
public record UpdateBreweryCommand(
Guid BreweryPostId,
Guid RequestingUserId,
byte[] RowVersion,
string BreweryName,
string Description,
UpdateBreweryLocation? Location
) : IRequest;
///
/// Defines the client-supplied body for updating a brewery post.
///
public record UpdateBreweryRequest(
Guid BreweryPostId,
byte[] RowVersion,
string BreweryName,
string Description,
UpdateBreweryLocation? Location
);