aboutsummaryrefslogtreecommitdiff
path: root/src/db
diff options
context:
space:
mode:
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,