diff options
Diffstat (limited to 'src/models/mod.rs')
-rw-r--r-- | src/models/mod.rs | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/src/models/mod.rs b/src/models/mod.rs index 5830a1b..a252f51 100644 --- a/src/models/mod.rs +++ b/src/models/mod.rs @@ -1,27 +1,30 @@ use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize)] -pub struct Car { - doors: u8, - engine: Engine, - make: String, - model: String, - transmission: Transmission, - trim: String, - year: u16, // I'll worry about this in 65534 AD. +pub struct Part { + pub key: u64, + pub number: String, + pub name: String, + pub sources: Vec<u64>, + pub categories: Vec<u64>, + pub fits_cars: Vec<u64>, } #[derive(Serialize, Deserialize)] -pub struct Part { - name: String, - compatible_cars: Vec<Car>, - sources: Vec<Source>, - categories: Vec<Category>, +pub struct Car { + pub key: u64, + pub doors: u8, + //pub engine: Engine, + pub make: String, + pub model: String, + //pub transmission: Transmission, + pub trim: String, + pub year: u16, } #[derive(Serialize, Deserialize)] pub enum Source { - Uri(String), + Web(String), } #[derive(Serialize, Deserialize)] |