1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
use std::path::PathBuf;
use json::object;
use df_plugin::plugins;
fn main() {
let root_path = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
// 生成数据库文件
let sql_path = root_path.join("model");
let sql_path = sql_path.to_str().unwrap();
let test = plugins("test").model("testmodel").create_json_file(sql_path);
println!("{}", test);
//
// let (code, data, msg) = plugins("test").model("testmodel").action("testaction").run(object! {});
// println!("{} {} {}", code, data, msg);
}