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

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 {
            _ => actions(name)
        }
    }
}