using Domain.Entities; namespace Features.Breweries.Repository; /// /// Repository for CRUD operations on brewery post records. /// public interface IBreweryRepository { /// Returns null if no brewery post exists with the given ID. Task GetByIdAsync(Guid id); Task> GetAllAsync(int? limit, int? offset); /// /// Updates a brewery post, enforcing optimistic concurrency via 's /// Timer: the update is rejected if the row was modified since Timer was read. /// Returns the freshly persisted brewery, including its new Timer. /// /// /// Thrown when no brewery exists with the given ID, or the given location's CityId does not /// exist. /// /// /// Thrown when 's Timer no longer matches the stored row (it was /// modified by another request since it was last read). /// Task UpdateAsync(BreweryPost brewery); Task DeleteAsync(Guid id); /// Creates a new brewery post, including its location details. /// Thrown when has no Location. Task CreateAsync(BreweryPost brewery); }