ServiceInfo.java 1.6 KB
package vion.model.monitor;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Getter;
import lombok.Setter;
import vion.dto.BaseDTO;

import java.time.LocalDateTime;

/**
 * 服务信息
 */
@Getter
@Setter
@TableName(value = "m_service")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ServiceInfo extends BaseDTO {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 唯一标识
     */
    @TableField(value = "uid")
    private String uid;

    /**
     * 名称
     */
    @TableField(value = "name", condition = SqlCondition.LIKE)
    private String name;

    /**
     * 请求路径:http(s)://ip(:port)/path
     */
    @TableField(value = "url")
    private String url;

    /**
     * 请求方法
     */
    @TableField(value = "\"method\"")
    private String method;

    /**
     * 监控类型:HTTP(s)
     */
    @TableField(value = "\"type\"")
    private String type;

    /**
     * 用户名
     */
    @TableField(value = "username")
    private String username;

    /**
     * 密码
     */
    @TableField(value = "\"password\"")
    private String password;

    /**
     * 描述
     */
    @TableField(value = "description")
    private String description;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private ServiceRecord serviceRecord;

    @TableField(exist = false)
    private String agentUid;
}