Skip to content

Core @Erupt

Usage

Add the @Erupt annotation to a class definition:

java
@Erupt(
       name = "Erupt",              // feature name
       desc = "Erupt Engine",       // description
       orderBy = "id desc",         // sort expression
       .....
)
public class EruptTest extends BaseModel {
    
    // TODO
    
}

Annotation Attributes

AttributeDescription
primaryKeyColPrimary key column name, defaults to id
nameFeature name
descFeature description
layoutPage layout configuration, see @Layout
authVerifyWhether access requires authorization
orderBySort rule, follows HQL ORDER BY syntax, see @OrderBy
powerControls add/delete/edit/query/import/export capabilities, see @Power
filterData display filter conditions, follows HQL WHERE syntax, see @Filter
treeTree node configuration, see @Tree
linkTreeLeft-tree right-table layout, see @LinkTree
drillsCustom drill-down associated views, see @Drill
rowOperationCustom action buttons, see @RowOperation
dataProxyService-layer logic extension (extending existing logic), see DataProxy
dataProxyParamsCustom parameters, accessible inside dataProxy via DataProxyContext.get()
visRawTableWhether to keep the default table view, defaults to true; set to false to show only the views defined in vis
visAdditional view configurations (card, Gantt, kanban, etc.), see @Vis Multi-View
paramCustom parameters
promptAI agent prompt — injected as context when erupt-ai invokes this entity's tool, added in 2.0.0
dragSortRow drag-sort configuration, see @DragSort, added in 2.0.4

Annotation Definition

java
public @interface Erupt {

    String primaryKeyCol() default "id"; // primary key column name, defaults to id

    String name(); // feature name

    String desc() default ""; // feature description

    boolean authVerify() default true; // whether access requires authorization

    Power power() default @Power; // controls add/delete/edit/query/import/export

    RowOperation[] rowOperation() default {}; // custom action buttons

    Drill[] drills() default {}; // custom drill-down associated views

    Filter[] filter() default {}; // data filtering

    String orderBy() default ""; // sort rule

    Class<? extends DataProxy>[] dataProxy() default {}; // proxy callback interface methods

    String[] dataProxyParams() default {}; // accessible inside dataProxy via DataProxyContext.get()

    Tree tree() default @Tree; // tree node configuration

    LinkTree linkTree() default @LinkTree(field = ""); // left-tree right-table configuration

    Layout layout() default @Layout; // page layout configuration

    KV[] param() default {}; // custom parameters

    String prompt() default ""; // AI agent prompt (2.0.0+)

    DragSort dragSort() default @DragSort(field = ""); // row drag-sort configuration (2.0.4+)
}

Contributors

The avatar of contributor named as YuePeng YuePeng
The avatar of contributor named as Claude Opus 5 (1M context) Claude Opus 5 (1M context)

Changelog

Released under the Apache-2.0 License.