From 881e4bf3c9141b4bebaefaf6385652ed46d9a9fe Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Wed, 7 Apr 2021 18:54:22 -0400 Subject: added some demo login template, functionality, also added basic kv store test and ui demo --- src/models/mod.rs | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'src/models') 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, + pub categories: Vec, + pub fits_cars: Vec, } #[derive(Serialize, Deserialize)] -pub struct Part { - name: String, - compatible_cars: Vec, - sources: Vec, - categories: Vec, +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)] -- cgit v1.2.3