df-plugin 0.1.32

This is an Plugin
Documentation
use df_fields::Field;
use json::{JsonValue, object};
use crate::plugin::{{plugin}}::{{model_a}}::{{model}};
use df_plugin::{Action, Model, Response, Tools};

pub struct {{action}} {
    pub model: {{model}},
}

impl Action for {{action}} {
    fn title(&mut self) -> String { "{{title}}".to_string() }
    fn name(&mut self) -> String { "{{api}}".to_string() }
    fn extend(&mut self) -> Vec<&str> {
        //vec!["db","cache","kafka"]
        vec!["db"]
    }
    fn token(&mut self) -> bool { true }
    fn params(&mut self) -> JsonValue {
        let mut params = object! {};
        return params;
    }

    fn index(&mut self, _header: JsonValue, request: JsonValue,mut tools: Tools) -> Response {
        return self.success(object! {}, "ok");
    }
}