summaryrefslogtreecommitdiff
path: root/dichroism/src/models.rs
diff options
context:
space:
mode:
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,
+}