makes models and schema modules privates, adds re-exports
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
extern crate diesel;
|
||||
extern crate dotenv;
|
||||
|
||||
pub mod schema;
|
||||
pub mod models;
|
||||
mod schema;
|
||||
mod models;
|
||||
|
||||
mod importer;
|
||||
|
||||
@@ -20,7 +20,7 @@ pub fn establish_connection() -> SqliteConnection {
|
||||
}
|
||||
|
||||
pub mod recipes {
|
||||
use crate::models::{Recipe};
|
||||
pub use crate::models::{Recipe, NewRecipe, fields::RecipeCategory};
|
||||
use super::{SqliteConnection, schema};
|
||||
use super::diesel::prelude::*;
|
||||
|
||||
@@ -41,7 +41,11 @@ pub mod recipes {
|
||||
}
|
||||
|
||||
pub mod ingredients {
|
||||
use crate::models::{Ingredient, NewIngredient, fields::IngredientId};
|
||||
pub use crate::models::{
|
||||
Ingredient,
|
||||
NewIngredient,
|
||||
fields::{IngredientId, IngredientList},
|
||||
};
|
||||
use super::{SqliteConnection, schema};
|
||||
use super::diesel::prelude::*;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user