package io.wdd.server.beans.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 
 * @TableName server_info
 */
@TableName(value = "server_info")
@Data
public class ServerInfoPO implements Serializable {
    /**
     * server primary key
     */
    @TableId(value = "server_id", type = IdType.AUTO)
    private Long serverId;

    /**
     * 建议合并至 provider
     */
    @TableField(value = "tenant_name")
    private String tenantName;

    /**
     * octopus message unique key name
     */
    @TableField(value = "topic_name")
    private String topicName;

    /**
     * server host name
     */
    @TableField(value = "server_name")
    private String serverName;

    /**
     * server public ipv4

     */
    @TableField(value = "server_ip_pb_v4")
    private String serverIpPbV4;

    /**
     * server inner ipv4

     */
    @TableField(value = "server_ip_in_v4")
    private String serverIpInV4;

    /**
     * server public ipv6

     */
    @TableField(value = "server_ip_pb_v6")
    private String serverIpPbV6;

    /**
     * server inner ipv6
     */
    @TableField(value = "server_ip_in_v6")
    private String serverIpInV6;

    /**
     * server register time
     */
    @TableField(value = "register_time")
    private LocalDateTime registerTime;

    /**
     * expire time
     */
    @TableField(value = "expire_time")
    private LocalDateTime expireTime;

    /**
     *
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    /**
     *
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * server location , type City Country
     */
    @TableField(value = "location")
    private String location;

    /**
     * server isp manager
     */
    @TableField(value = "provider")
    private String provider;

    /**
     * 
     */
    @TableField(value = "cpu_brand")
    private String cpuBrand;

    /**
     * 
     */
    @TableField(value = "cpu_core")
    private String cpuCore;

    /**
     * 
     */
    @TableField(value = "memory_total")
    private String memoryTotal;

    /**
     * 
     */
    @TableField(value = "disk_total")
    private String diskTotal;

    /**
     * 
     */
    @TableField(value = "disk_usage")
    private String diskUsage;

    /**
     * 
     */
    @TableField(value = "io_speed")
    private String ioSpeed;

    /**
     * 
     */
    @TableField(value = "tcp_control")
    private String tcpControl;

    /**
     * server virtualization method
     */
    @TableField(value = "virtualization")
    private String virtualization;

    /**
     * 
     */
    @TableField(value = "os_info")
    private String osInfo;

    /**
     * 
     */
    @TableField(value = "os_kernel_info")
    private String osKernelInfo;

    /**
     * machine uuid from /etc/machineid
     */
    @TableField(value = "machine_id")
    private String machineId;

    /**
     * 
     */
    @TableField(value = "comment")
    private String comment;

    /**
     * 0 alive || 1 deleted
     */
    @TableField(value = "is_delete")
    private Integer isDelete;

    /**
     * optimistic lock for concurrent
     */
    @TableField(value = "version")
    private Integer version;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}