package com.usky.vpp.domain;

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 lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * vpp_device
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("vpp_device")
public class VppDevice implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @TableField("device_code")
    private String deviceCode;
    @TableField("device_uuid")
    private String deviceUuid;
    @TableField("device_name")
    private String deviceName;
    @TableField("site_id")
    private Long siteId;
    @TableField("device_type")
    private String deviceType;
    private String manufacturer;
    private String model;
    @TableField("rated_power_kw")
    private BigDecimal ratedPowerKw;
    @TableField("firmware_version")
    private String firmwareVersion;
    @TableField("last_online_at")
    private LocalDateTime lastOnlineAt;
    @TableField("gateway_id")
    private String gatewayId;
    /**
     * 运管资源ID，全局唯一
     */
    @TableField("un_resource_id")
    private String unResourceId;
    private String remark;
    @TableField("tenant_id")
    private Integer tenantId;
    @TableField("create_time")
    private LocalDateTime createTime;
    @TableField("update_time")
    private LocalDateTime updateTime;
    @TableField("created_by")
    private String createdBy;
    @TableField("updated_by")
    private String updatedBy;
    @TableField("delete_flag")
    private Integer deleteFlag;
    @TableField("deleted_at")
    private LocalDateTime deletedAt;

    /**
     * 物联网实时状态（来自 dmp_device_status，非本表字段）
     * 1：在线，2：离线
     */
    @TableField(exist = false)
    private Integer deviceStatus;
}
