using Domain.Entities;
namespace Features.Breweries.Dtos;
///
/// Represents location data returned for a brewery post.
///
///
/// Contains the serialized geographic coordinates, when available.
///
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
);
///
/// Represents a brewery post returned by the API.
///
///
/// Records the most recent update time, if the post has been updated.
///
///
/// Provides the concurrency token required for updates.
///
///
/// Contains the post's location, when one is available.
///
public record BreweryDto(
Guid BreweryPostId,
Guid PostedById,
string BreweryName,
string Description,
DateTime CreatedAt,
DateTime? UpdatedAt,
byte[]? RowVersion,
BreweryLocationDto? Location
);
///
/// Represents the location-focused result returned by brewery searches.
///
///
/// Contains the distance from the search origin in metres, when applicable.
///
public record BreweryWithLocationDto(
Guid BreweryPostId,
string BreweryName,
BreweryLocationDto? Location,
double? DistanceMetres
);