parsonsmatt / gear-tracker

An application that helps cyclists track their gear
BSD 3-Clause "New" or "Revised" License
8 stars 0 forks source link

Bikes and components #1

Closed parsonsmatt closed 4 years ago

parsonsmatt commented 4 years ago

A Bike has many Components. A Component may have other Components. There will be many types of Components, and the granularity that you want to track that should be up to the user.

It should be fine to say I have a Bike { id = 1, name = "Fave" }, and I can have a Component { bikeId = 1, type = "Tire" }, even though tires don't "go on" bikes, they go on wheels.

It should be also fine to say I have a Bike with a Component { type = "Wheel" }, and on that wheel, I have a Component { type = "Tire" }.

I should be able to move a component from one bike (or component) to another. Distance calculations should cascade. The time that I move a component should determine what use that component gets.