package com.qqchen.deploy.backend.deploy.query;

import com.qqchen.deploy.backend.framework.enums.MonitorMetricEnum;
import com.qqchen.deploy.backend.framework.annotation.QueryField;
import com.qqchen.deploy.backend.framework.enums.QueryType;
import com.qqchen.deploy.backend.framework.query.BaseQuery;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 服务器告警规则查询条件
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "服务器告警规则查询条件")
public class ServerAlertRuleQuery extends BaseQuery {

    @Schema(description = "服务器ID")
    @QueryField(field = "serverId")
    private Long serverId;

    @Schema(description = "规则名称（模糊匹配）")
    @QueryField(field = "ruleName", type = QueryType.LIKE)
    private String ruleName;

    @Schema(description = "监控指标类型")
    @QueryField(type = QueryType.EQUAL)
    private MonitorMetricEnum alertType;

    @Schema(description = "是否启用")
    @QueryField(field = "enabled")
    private Boolean enabled;
}
