use json::{JsonValue, object};
use df_plugin::{Action, actions, Model};
pub struct {{model}} {}
impl Model for {{model}} {
fn title(&mut self) -> String { "{{title}}".to_string()}
fn table(&mut self) -> String { "{{plugin_model}}".to_string()}
fn fields(&mut self) -> JsonValue {
let fields = object! {};
return fields;
}
fn action(&mut self, name: &str) -> Box<dyn Action> {
match name {
//"table" => Box::new(Table { model: {{model}} {} }),
//"add" => Box::new(Add { model: {{model}} {} }),
_ => actions(name)
}
}
}
//pub mod table;
//pub mod add;