Agent.java 2.62 KB
package vion.model.monitor;

import com.baomidou.mybatisplus.annotation.*;
import io.github.linpeilie.annotations.AutoMapper;
import io.github.linpeilie.annotations.AutoMappers;
import lombok.Getter;
import lombok.Setter;
import vion.dto.monitor.AgentDTO;
import vion.vo.monitor.AgentVO;

import java.time.LocalDateTime;

/**
 * @author vion
 * @date 2024/10/16
 */
@Getter
@Setter
@TableName(value = "m_agent")
@AutoMappers({
        @AutoMapper(target = AgentVO.class),
        @AutoMapper(target = AgentDTO.class),
})
public class Agent {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

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

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

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

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

    /**
     * 别名
     */
    @TableField(value = "\"alias\"", condition = SqlCondition.LIKE)
    private String alias;

    /**
     * agent类型 1:store,2:mall
     */
    @TableField(value = "type")
    private Short type;

    /**
     * agent 版本号
     */
    @TableField(value = "version")
    private String version;

    /**
     * 主机名
     */
    @TableField(value = "hostname", condition = SqlCondition.LIKE)
    private String hostname;

    /**
     * 本地ip
     */
    @TableField(value = "local_ipaddr", condition = SqlCondition.LIKE)
    private String localIpaddr;

    /**
     * 公网ip
     */
    @TableField(value = "ipaddr", condition = SqlCondition.LIKE)
    private String ipaddr;

    /**
     * 归属地
     */
    @TableField(value = "addr", condition = SqlCondition.LIKE)
    private String addr;

    /**
     * 操作系统
     */
    @TableField(value = "os")
    private String os;

    /**
     * 系统信息
     */
    @TableField(value = "system_info")
    private String systemInfo;

    /**
     * 时区
     */
    @TableField(value = "time_zone")
    private String timeZone;

    /**
     * 授权到期时间
     */
    @TableField(value = "license_date")
    private String licenseDate;

    /**
     * 0:离线 1:在线
     */
    @TableField(value = "status")
    private Short status;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

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

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