summaryrefslogtreecommitdiff
path: root/dichroism/src/models.rs
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2020-10-07 09:37:41 -0400
committerAdam T. Carpenter <atc@53hor.net>2020-10-07 09:37:41 -0400
commit89722ebd6dcdc7067277050a431fbb7b9ea1dcf5 (patch)
treea23a5029b94e7ddec8d8ecdae0438f353cede71a /dichroism/src/models.rs
parent743ae22168b1fcdf2e1e54bcadbb1bb3fce3370d (diff)
downloadtheglassyladies-89722ebd6dcdc7067277050a431fbb7b9ea1dcf5.tar.xz
theglassyladies-89722ebd6dcdc7067277050a431fbb7b9ea1dcf5.zip
sorted out image repo, error handling
Diffstat (limited to 'dichroism/src/models.rs')
-rw-r--r--dichroism/src/models.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/dichroism/src/models.rs b/dichroism/src/models.rs
index 5516688..0485237 100644
--- a/dichroism/src/models.rs
+++ b/dichroism/src/models.rs
@@ -1,5 +1,12 @@
-#[derive(Debug, Queryable, Serialize)]
+#[derive(Debug, Queryable, Serialize, Clone)]
pub struct ProductImg {
pub id: i32,
pub path: String,
}
+
+use super::schema::images;
+#[table_name = "images"]
+#[derive(Debug, Insertable)]
+pub struct NewProductImg {
+ pub path: String,
+}