summaryrefslogtreecommitdiff
path: root/src/models
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2021-04-07 18:54:22 -0400
committerAdam T. Carpenter <atc@53hor.net>2021-04-07 18:54:22 -0400
commit881e4bf3c9141b4bebaefaf6385652ed46d9a9fe (patch)
treea56a068b4f725c386de7575c7f9a2f084363a16f /src/models
parentb1c45640a72300433800c8370657335616f8c541 (diff)
downloadtwinh-881e4bf3c9141b4bebaefaf6385652ed46d9a9fe.tar.xz
twinh-881e4bf3c9141b4bebaefaf6385652ed46d9a9fe.zip
added some demo login template, functionality, also added basic kv store test and ui demo
Diffstat (limited to 'src/models')
-rw-r--r--src/models/mod.rs31
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)]