package cn.ibizlab.codegen.model;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;
import net.ibizsys.model.dataentity.action.IPSDEAction;
import net.ibizsys.model.dataentity.action.IPSDEActionLogic;
import net.ibizsys.model.dataentity.action.IPSDELogicAction;
import net.ibizsys.model.dataentity.action.IPSDEScriptAction;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;

import java.util.*;

@Getter
@Setter
@NoArgsConstructor
@Accessors(chain = true)
public class ActionLogicModel extends BaseModel {

    public ActionLogicModel(ActionModel actionModel, IPSDEActionLogic iPSDEActionLogic, int index) {
        this.opt = iPSDEActionLogic;
        this.actionModel = actionModel;
        this.entityModel = actionModel.getEntity();
        this.id = String.format("%s_%s", actionModel.getCodeName(), index);
    }

    public IPSDEActionLogic getPSDEActionLogic() {
        return (IPSDEActionLogic) opt;
    }

    private ActionModel actionModel;
    private EntityModel entityModel;



}
