using Domain.Entities;
using Features.Breweries.Dtos;
using MediatR;
namespace Features.Breweries.Commands.UpdateBrewery;
/// Location details for a brewery being updated.
///
/// Identifier of the existing location row, if any; a new row is created if none exists yet.
///
/// Raw binary representation of the brewery's geographic coordinates.
public record UpdateBreweryLocation(
Guid BreweryPostLocationId,
Guid CityId,
string AddressLine1,
string? AddressLine2,
string PostalCode,
CoordinateData? Coordinates
);
///
/// Updates an existing brewery post. A null clears the brewery's location.
/// must be the row-version last read for this brewery (e.g. from a prior
/// GET); the update is rejected with a 409 Conflict if the brewery was modified since then.
///
public record UpdateBreweryCommand(
Guid BreweryPostId,
Guid RequestingUserId,
byte[] RowVersion,
string BreweryName,
string Description,
UpdateBreweryLocation? Location
) : IRequest;
/// Request body for PUT /api/brewery/{id}.
public record UpdateBreweryRequest(
Guid BreweryPostId,
byte[] RowVersion,
string BreweryName,
string Description,
UpdateBreweryLocation? Location
);