using Domain.Entities;
namespace Features.Breweries.Dtos;
/// Location details of a brewery, as returned by the API.
/// The brewery's geographic coordinates, in a raw binary representation.
public record BreweryLocationDto(
Guid BreweryPostLocationId,
Guid CityId,
string CityName,
string StateProvinceName,
string StateProvinceCode,
string CountryName,
string CountryCode,
string AddressLine1,
string? AddressLine2,
string PostalCode,
CoordinateData? Coordinates
);
/// A brewery post, as returned by the API.
/// The date and time of the last edit, or if never edited.
/// The row-version/concurrency token used to detect conflicting concurrent updates.
/// The brewery's location, or if none has been set.
public record BreweryDto(
Guid BreweryPostId,
Guid PostedById,
string BreweryName,
string Description,
DateTime CreatedAt,
DateTime? UpdatedAt,
byte[]? RowVersion,
BreweryLocationDto? Location
);
///
/// The distance, in metres, from a query's origin point, or for queries with no
/// origin point (e.g. GET /api/brewery/locations).
///
public record SimplifiedBreweryDto(
Guid BreweryPostId,
string BreweryName,
BreweryLocationDto? Location,
double? DistanceMetres
);