add map and clicks

This commit is contained in:
Jonas Rabenstein 2026-08-12 17:57:25 +02:00
commit 3cfd5bdd6c
8 changed files with 1195 additions and 992 deletions

View file

@ -30,42 +30,50 @@ pub struct WebhookEnvelope {
#[derive(Debug, Deserialize)]
pub struct WebhookEvent {
pub athlete_id: String,
#[serde(rename = "type")]
pub event_type: String,
pub timestamp: DateTime<Utc>,
#[serde(default)]
pub activity: Option<Value>,
}
#[derive(Debug, Serialize)]
#[derive(Debug, Serialize, Clone)]
pub struct LeaderboardRow {
pub rank: i64,
pub athlete: String,
pub from_county: String,
pub to_county: String,
pub crossing_time: DateTime<Utc>,
pub activity_id: String,
pub activity_url: String,
pub interval_url: Option<String>,
pub average_watts: Option<f64>,
pub average_heartrate: Option<f64>,
pub lat: f64,
pub lon: f64,
}
#[derive(Debug, Serialize, Clone)]
pub struct LeaderboardGroup {
pub bucket_start: DateTime<Utc>,
pub from_county: String,
pub to_county: String,
pub crossing_lat: f64,
pub crossing_lon: f64,
pub rows: Vec<LeaderboardRow>,
}
#[derive(Debug, Serialize, Clone)]
pub struct ActivityCrossing {
pub crossing_time: DateTime<Utc>,
pub from_county: String,
pub to_county: String,
pub lat: f64,
pub lon: f64,
pub rank: i64,
pub activity_id: String,
pub athlete: String,
pub interval_url: Option<String>,
pub average_watts: Option<f64>,
pub average_heartrate: Option<f64>,
}
#[derive(Debug, Serialize)]
pub struct LeaderboardGroup {
pub bucket_start: DateTime<Utc>,
pub from_county: String,
pub to_county: String,
pub rows: Vec<LeaderboardRow>,
}