package com.infoepoch.pms.agent.platform.agent.domain.irepository;

import com.infoepoch.pms.agent.common.utils.AbstractCriteria;

/**
 * @author jiangyz
 * @date 2026/4/17 16:51
 * 智能体字段定义查询条件类
 */
public class AgentFieldCriteria extends AbstractCriteria {

    //region 智能体id
    public boolean byAgentId() {
        return this.andMap.containsKey("AgentId");
    }

    private String agentId;

    public String getAgentId() {
        if (byAgentId())
            return agentId;
        return null;
    }

    public void setAgentId(String value) {
        this.agentId = value;
        this.andMap.put("AgentId", value);
    }
    //endregion

    //region 字段英文名，如 leave_start_date
    public boolean byFieldName() {
        return this.andMap.containsKey("FieldName");
    }

    private String fieldName;

    public String getFieldName() {
        if (byFieldName())
            return fieldName;
        return null;
    }

    public void setFieldName(String value) {
        this.fieldName = value;
        this.andMap.put("FieldName", value);
    }
    //endregion

    //region 字段英文名，如 leave_start_date模糊查询
    public boolean byFieldNameContain() {
        return this.andMap.containsKey("FieldNameContain");
    }

    private String fieldNameContain;

    public String getFieldNameContain() {
        if (byFieldNameContain())
            return fieldNameContain;
        return null;
    }

    public void setFieldNameContain(String value) {
        this.fieldNameContain = value;
        this.andMap.put("FieldNameContain", value);
    }
    //endregion

    //region 字段中文名，如 请假开始日期
    public boolean byFieldLabel() {
        return this.andMap.containsKey("FieldLabel");
    }

    private String fieldLabel;

    public String getFieldLabel() {
        if (byFieldLabel())
            return fieldLabel;
        return null;
    }

    public void setFieldLabel(String value) {
        this.fieldLabel = value;
        this.andMap.put("FieldLabel", value);
    }
    //endregion

    //region 字段中文名，如 请假开始日期模糊查询
    public boolean byFieldLabelContain() {
        return this.andMap.containsKey("FieldLabelContain");
    }

    private String fieldLabelContain;

    public String getFieldLabelContain() {
        if (byFieldLabelContain())
            return fieldLabelContain;
        return null;
    }

    public void setFieldLabelContain(String value) {
        this.fieldLabelContain = value;
        this.andMap.put("FieldLabelContain", value);
    }
    //endregion

    //region text / number / date / datetime / enum / boolean
    public boolean byFieldType() {
        return this.andMap.containsKey("FieldType");
    }

    private String fieldType;

    public String getFieldType() {
        if (byFieldType())
            return fieldType;
        return null;
    }

    public void setFieldType(String value) {
        this.fieldType = value;
        this.andMap.put("FieldType", value);
    }
    //endregion

    //region 是否必填
    public boolean byRequired() {
        return this.andMap.containsKey("Required");
    }

    private Boolean required;

    public Boolean getRequired() {
        if (byRequired())
            return required;
        return null;
    }

    public void setRequired(Boolean value) {
        this.required = value;
        this.andMap.put("Required", value);
    }
    //endregion

}
