diff --git a/herodb/Cargo.toml b/herodb/Cargo.toml index b503016..2dd1c57 100644 --- a/herodb/Cargo.toml +++ b/herodb/Cargo.toml @@ -25,3 +25,7 @@ paste = "1.0" [[example]] name = "rhai_demo" path = "examples/rhai_demo.rs" + +[[bin]] +name = "dbexample2" +path = "src/cmd/dbexample2/main.rs" diff --git a/herodb/src/db/model_methods.rs b/herodb/src/db/model_methods.rs index 415a610..45fffd7 100644 --- a/herodb/src/db/model_methods.rs +++ b/herodb/src/db/model_methods.rs @@ -1,9 +1,7 @@ use crate::db::db::DB; use crate::db::base::{SledDBResult, SledModel}; use crate::impl_model_methods; -use crate::models::biz::product::Product; -use crate::models::biz::sale::Sale; -use crate::models::biz::Currency; +use crate::models::biz::{Product, Sale, Currency}; // Implement model-specific methods for Product impl_model_methods!(Product, product, products); diff --git a/herodb/src/models/biz/mod.rs b/herodb/src/models/biz/mod.rs new file mode 100644 index 0000000..c7c3372 --- /dev/null +++ b/herodb/src/models/biz/mod.rs @@ -0,0 +1,13 @@ +pub mod currency; +pub mod product; +pub mod sale; + +// Re-export all model types for convenience +pub use product::{Product, ProductComponent, ProductType, ProductStatus}; +pub use sale::{Sale, SaleItem, SaleStatus}; +pub use currency::Currency; + +// Re-export builder types +pub use product::{ProductBuilder, ProductComponentBuilder}; +pub use sale::{SaleBuilder, SaleItemBuilder}; +pub use currency::CurrencyBuilder; \ No newline at end of file