
package com.lideeyunji.core.framework.config.btncommand.button;

import com.lideeyunji.core.framework.config.btncommand.receiver.IButtonCommandReceiver;
import com.lideeyunji.tool.framework.yunji.model.ExecuteEnhanceModel;

/**
 * 具体命令-新增按钮命令
 */
public class AddButtonCommand implements IButtonCommand<ExecuteEnhanceModel> {
    //命令执行者
    private IButtonCommandReceiver<ExecuteEnhanceModel> recevier;

    private String name = "新增";

    /**
     * 绑定执行者
     * @param recevier 执行者
     */
    public AddButtonCommand(IButtonCommandReceiver recevier) {
        this.recevier = recevier;
    }

    /**
     * 执行命令
     * @return
     */
    @Override
    public ExecuteEnhanceModel execute() {
        return recevier.receiver();
    }



    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
