aboutsummaryrefslogtreecommitdiff
path: root/src/db
diff options
context:
space:
mode:
authorMelody Horn / boringcactus <melody@boringcactus.com>2021-06-18 13:42:52 -0600
committerMelody Horn / boringcactus <melody@boringcactus.com>2021-06-18 13:42:52 -0600
commitacf79a306797b1b12e95415c340792d7c88815ab (patch)
treee2c34c6620e0782e31278c087f5ce201606ce9c0 /src/db
parent7969e3a85dcb2d936fa2e09b4253b8e801c48c6e (diff)
downloadtosin-acf79a306797b1b12e95415c340792d7c88815ab.tar.gz
tosin-acf79a306797b1b12e95415c340792d7c88815ab.zip
lay groundwork for make-migrations
Diffstat (limited to 'src/db')
-rw-r--r--src/db/models/meta.rs3
-rw-r--r--src/db/models/mod.rs1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/db/models/meta.rs b/src/db/models/meta.rs
index 50729a8..16e7290 100644
--- a/src/db/models/meta.rs
+++ b/src/db/models/meta.rs
@@ -1,3 +1,6 @@
+use super::Field;
+
pub struct ModelMeta {
pub name: &'static str,
+ pub fields: &'static [Field],
}
diff --git a/src/db/models/mod.rs b/src/db/models/mod.rs
index feadb43..3f39ccd 100644
--- a/src/db/models/mod.rs
+++ b/src/db/models/mod.rs
@@ -5,6 +5,7 @@ pub use meta::*;
pub type Id = usize;
+#[derive(Clone, Debug)]
pub enum Field {
CharField {
name: &'static str,