final db models wip
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
use heromodels::db::hero::OurDB;
|
||||
use heromodels::models::calendar::{Attendee, AttendanceStatus, Calendar, Event};
|
||||
use heromodels::models::calendar::rhai::register_rhai_engine_functions;
|
||||
use rhai::Engine;
|
||||
use std::sync::Arc;
|
||||
use std::{fs, path::Path};
|
||||
use rhai_wrapper::wrap_vec_return;
|
||||
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
// Initialize Rhai engine
|
||||
@@ -14,6 +17,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
// Register the Calendar type with Rhai
|
||||
// This function is generated by the #[rhai_model_export] attribute
|
||||
Calendar::register_rhai_bindings_for_calendar(&mut engine, db.clone());
|
||||
register_rhai_engine_functions(&mut engine, db.clone());
|
||||
|
||||
// Register a function to get the database instance
|
||||
engine.register_fn("get_db", move || db.clone());
|
||||
|
Reference in New Issue
Block a user