Restructure crates for correct proc macro usage
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use heromodels::model;
|
||||
use heromodels::models::core::model::{BaseModelData, Model, IndexKey};
|
||||
use serde::{Serialize, Deserialize};
|
||||
use heromodels_core::{BaseModelData, Model};
|
||||
use heromodels_derive::model;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
// Basic usage
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
@@ -14,16 +14,17 @@ pub struct SimpleUser {
|
||||
fn main() {
|
||||
println!("Hero Models - Simple Model Example");
|
||||
println!("==================================");
|
||||
|
||||
|
||||
// Example usage of the generated implementation
|
||||
println!("SimpleUser DB Prefix: {}", SimpleUser::db_prefix());
|
||||
|
||||
|
||||
let user = SimpleUser {
|
||||
base_data: BaseModelData::new(1),
|
||||
login: "johndoe".to_string(),
|
||||
full_name: "John Doe".to_string(),
|
||||
};
|
||||
|
||||
|
||||
println!("\nSimpleUser ID: {}", user.get_id());
|
||||
println!("SimpleUser DB Keys: {:?}", user.db_keys());
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user