package cn.iocoder.yudao.module.iot.controller.admin.alert.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Schema(description = "管理后台 - 告警配置新增/修改 Request VO")
@Data
public class AlertSaveReqVO {

    @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28840")
    private Long id;

    @Schema(description = "编码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "编码不能为空")
    private String alertCode;

    @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
    @NotEmpty(message = "名称不能为空")
    private String alertName;

    @Schema(description = "告警类型", example = "2")
    private String alertType;

    @Schema(description = "告警等级")
    private String alertLevel;

    @Schema(description = "告警内容")
    private String content;

    @Schema(description = "告警条件")
    private String conditionInfo;

    @Schema(description = "逻辑表达式")
    private String conditionFormula;

    @Schema(description = "告警音频", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "告警音频不能为空")
    private String alertAudio;

    @Schema(description = "重复告警", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "重复告警不能为空")
    private Boolean isRepeat;

    @Schema(description = "不重复间隔", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "不重复间隔不能为空")
    private Long noRepeatDuration;

    @Schema(description = "是否启用", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "是否启用不能为空")
    private Boolean isEnable;

}