brewlog/src/domain/coffee/nearby_cafes.rs
Jon Seager 3d49236c13
refactor: move NearbyCafe to domain layer to fix dependency violation
The presentation layer was importing NearbyCafe directly from
infrastructure::foursquare, violating the dependency flow
(presentation -> application -> domain <- infrastructure). Introduce
NearbyCafeResult in domain::nearby_cafes and update all
references.
2026-02-13 16:20:20 +00:00

16 lines
493 B
Rust

use serde::{Deserialize, Serialize};
/// A nearby cafe result from a location-based search.
///
/// This is a domain-level representation that decouples the presentation
/// layer from any specific third-party API (e.g. Foursquare).
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct NearbyCafeResult {
pub name: String,
pub latitude: f64,
pub longitude: f64,
pub city: String,
pub country: String,
pub website: Option<String>,
pub distance_meters: u32,
}