1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
use crate::activity::ActivityType;
use bson::oid::ObjectId;
use getset::{Getters, Setters};
use serde::{Deserialize, Serialize};
#[cfg(feature = "wasm")]
use wasm_bindgen::prelude::wasm_bindgen;
#[cfg_attr(feature = "wasm", wasm_bindgen)]
#[derive(Debug, Serialize, Deserialize, Getters, Setters, Default, Clone)]
#[getset(get = "pub", set = "pub")]
#[serde(rename_all = "camelCase")]
pub struct Activity {
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(rename = "_id")]
id: Option<ObjectId>,
rider_id: String,
name: Option<String>,
description: Option<String>,
data_source: Option<String>,
external_source_name: Option<String>,
external_activity_id: Option<String>,
external_athlete_id: Option<String>,
activity_type: Option<ActivityType>,
pub distance: Option<f32>,
pub moving_time: Option<i32>,
pub elapsed_time: Option<i32>,
pub total_elevation_gain: Option<f32>,
start_date: Option<String>,
pub start_timestamp: Option<i64>,
start_date_local: Option<String>,
pub start_timestamp_local: Option<i64>,
pub start_day_local: Option<i32>,
pub start_month_local: Option<i32>,
pub start_year_local: Option<i32>,
timezone: Option<String>,
pub utc_offset: Option<f32>,
pub commute: Option<bool>,
pub manual: Option<bool>,
pub private: Option<bool>,
pub flagged: Option<bool>,
pub workout_type: Option<i32>,
}