Create a new app for fitnesstrax and start setting up the record data structures #114
|
@ -56,11 +56,8 @@ pub struct Weight {
|
|||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub enum TraxRecord {
|
||||
BikeRide(TimeDistance),
|
||||
Pushups,
|
||||
Row(TimeDistance),
|
||||
Run(TimeDistance),
|
||||
Situps,
|
||||
Squats,
|
||||
Steps(Steps),
|
||||
Swim(TimeDistance),
|
||||
Walk(TimeDistance),
|
||||
|
@ -71,11 +68,8 @@ impl Recordable for TraxRecord {
|
|||
fn timestamp(&self) -> Timestamp {
|
||||
match self {
|
||||
TraxRecord::BikeRide(rec) => Timestamp::DateTime(rec.datetime.clone()),
|
||||
TraxRecord::Pushups => unimplemented!(),
|
||||
TraxRecord::Row(rec) => Timestamp::DateTime(rec.datetime.clone()),
|
||||
TraxRecord::Run(rec) => Timestamp::DateTime(rec.datetime.clone()),
|
||||
TraxRecord::Situps => unimplemented!(),
|
||||
TraxRecord::Squats => unimplemented!(),
|
||||
TraxRecord::Steps(rec) => Timestamp::Date(rec.date),
|
||||
TraxRecord::Swim(rec) => Timestamp::DateTime(rec.datetime.clone()),
|
||||
TraxRecord::Walk(rec) => Timestamp::DateTime(rec.datetime.clone()),
|
||||
|
|
Loading…
Reference in New Issue