package com.jay.monitor.data.server.avue.template.rulePlatform;

import com.jay.monitor.data.server.controllers.AlertPlatformController;
import com.jay.monitor.data.server.enums.AlertMsgEnums;
import com.ruoyi.client.annotation.AVueConfig;
import com.ruoyi.client.annotation.AVuePage;
import com.ruoyi.client.annotation.AVueRouteKey;
import com.ruoyi.client.annotation.AVueTableOption;
import com.ruoyi.client.annotation.column.*;

import java.util.Date;

/**
 * 模拟增删改查表单列表构建数据
 *
 * @author liukaixiong
 * @Email liukx@elab-plus.com
 * @date 2021/8/17 - 13:02
 */
@AVueRouteKey(groupKey = "alert-platform")
@AVueTableOption(title = "告警平台配置管理", dialogDrag = true)
@AVuePage(pageRoot = "pageModel", pageData = "resultSet")
@AVueConfig(list = AlertPlatformController.LIST_URL, update = AlertPlatformController.UPDATE_URL, save = AlertPlatformController.ADD_URL, del = AlertPlatformController.DEL_URL)
public class AlertPlatformAVueModel {

    @AVueInput(prop = "id", label = "主键", addDisplay = false, editDisplay = false)
    private String id;
    /**
     * 告警名称
     */
    @AVueInput(prop = "alertName", label = "告警标题", search = true, required = true)
    private String alertName;
    /**
     * 平台类型
     */
    @AVueSelect(prop = "platformType", label = "告警平台类型", dicData = "AlertMsgEnums", required = true)
    private AlertMsgEnums platformType = AlertMsgEnums.DingDing;

    /**
     * 地址
     */
    @AVueTextarea(prop = "url", label = "第三方URL", row = true, required = true, hide = true)
    private String url;

    @AVueTextarea(prop = "remark", label = "备注")
    private String remark;
    /**
     * 拓展参数
     */
    @AVueJson(prop = "extJson", label = "拓展参数", labelTip = "请输入JSON类型的参数", hide = true)
    private MapAVueModel extJson;
    /**
     * 状态
     */
    @AVueSelect(prop = "status", label = "状态", dicData = "StatusEnum", addDisplay = true)
    private Integer status;

    @AVueInput(prop = "creator", label = "创建人", addDisplay = false, editDisabled = true)
    private String creator;
    @AVueDatetime(prop = "createDate", label = "创建时间", format = "yyyy-MM-dd HH:mm:ss", addDisplay = false, editDisabled = true)
    private Date createDate;
    @AVueInput(prop = "updator", label = "修改人", addDisplay = false, editDisabled = true)
    private String updator;
    @AVueDatetime(prop = "updated", label = "修改时间", format = "yyyy-MM-dd HH:mm:ss", addDisplay = false, editDisabled = true)
    private Date updated;
}
