use json::{JsonValue, object};
use df_plugin::{Action, actions, Model};

pub struct {{model}} {}

impl Model for {{model}} {
    fn title(&mut self) -> &'static str { "{{title}}"}
    fn table(&mut self) -> &'static str { "{{plugin_model}}"}
    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;