package com.zksy.api.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 com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * 设备状态表（zk-api-service 轻量版）
 */
@Data
@TableName(value = "equipment_status", schema = "app_user")
public class EquipmentStatus {

    @TableId(value = "status_id", type = IdType.AUTO)
    private Integer statusId;

    @TableField(value = "equipment_id")
    private String equipmentId;

    @TableField(value = "current_status")
    private Integer currentStatus;

    /** 报警状态（0-正常，1-报警） */
    @TableField(value = "alarm_status")
    private Integer alarmStatus;

    @TableField(value = "online_status")
    private Integer onlineStatus;

    @TableField(value = "user_id")
    private Long userId;

    @TableField(value = "installation_addr")
    private String installationAddr;

    @TableField(value = "last_maintain_date")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date lastMaintainDate;

    @TableField(value = "next_maintain_date")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date nextMaintainDate;

    @TableField(value = "status_update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime statusUpdateTime;

    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @TableField(value = "del_flag")
    private String delFlag;
}