From acf79a306797b1b12e95415c340792d7c88815ab Mon Sep 17 00:00:00 2001 From: Melody Horn / boringcactus Date: Fri, 18 Jun 2021 13:42:52 -0600 Subject: lay groundwork for make-migrations --- src/db/models/meta.rs | 3 +++ src/db/models/mod.rs | 1 + 2 files changed, 4 insertions(+) (limited to 'src/db/models') 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, -- cgit v1.2.3