Create a new app for fitnesstrax and start setting up the record data structures #114

Merged
savanni merged 7 commits from fitnesstrax-record into main 2023-12-07 14:17:59 +00:00
1 changed files with 0 additions and 6 deletions
Showing only changes of commit b9aa434278 - Show all commits

View File

@ -56,11 +56,8 @@ pub struct Weight {
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum TraxRecord { pub enum TraxRecord {
BikeRide(TimeDistance), BikeRide(TimeDistance),
Pushups,
Row(TimeDistance), Row(TimeDistance),
Run(TimeDistance), Run(TimeDistance),
Situps,
Squats,
Steps(Steps), Steps(Steps),
Swim(TimeDistance), Swim(TimeDistance),
Walk(TimeDistance), Walk(TimeDistance),
@ -71,11 +68,8 @@ impl Recordable for TraxRecord {
fn timestamp(&self) -> Timestamp { fn timestamp(&self) -> Timestamp {
match self { match self {
TraxRecord::BikeRide(rec) => Timestamp::DateTime(rec.datetime.clone()), TraxRecord::BikeRide(rec) => Timestamp::DateTime(rec.datetime.clone()),
TraxRecord::Pushups => unimplemented!(),
TraxRecord::Row(rec) => Timestamp::DateTime(rec.datetime.clone()), TraxRecord::Row(rec) => Timestamp::DateTime(rec.datetime.clone()),
TraxRecord::Run(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::Steps(rec) => Timestamp::Date(rec.date),
TraxRecord::Swim(rec) => Timestamp::DateTime(rec.datetime.clone()), TraxRecord::Swim(rec) => Timestamp::DateTime(rec.datetime.clone()),
TraxRecord::Walk(rec) => Timestamp::DateTime(rec.datetime.clone()), TraxRecord::Walk(rec) => Timestamp::DateTime(rec.datetime.clone()),