package com.agri.system.domain;

import com.agri.common.annotation.Excel;
import com.agri.common.core.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.models.auth.In;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 大棚管理对象 sys_agri_info
 * 
 * @author agri
 * @date 2026-01-08
 */
@Data
@TableName("sys_agri_info")
public class SysAgriInfo extends BaseEntity
{
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /** 设备IMEI */
    @Excel(name = "设备IMEI")
    private String imei;

    /** 大棚名称 */
    @Excel(name = "大棚名称")
    private String agriName;

    /** 工作模式 */
    @Excel(name = "工作模式")
    private Integer workMode;

    /** 关联用户ID */
    @Excel(name = "关联用户ID")
    private Long userId;

    /** 告警开关(0-关闭，1-开启) */
    @Excel(name = "告警开关(0-关闭，1-开启)")
    private Integer alarmStatus;

    @TableField(exist = false)
    /** 设备状态(0-离线，1-在线，2-故障) */
    @Excel(name = "设备状态(0-离线，1-在线，2-故障)")
    private Integer deviceStatus;

    /** 安装时间 */
    @Getter
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date installTime;

    /** 安装位置 */
    @Setter
    @Excel(name = "安装位置")
    private String location;

    /** 逻辑删除(0-未删，1-已删) */
    @Excel(name = "逻辑删除(0-未删，1-已删)")
    @TableLogic(value = "0", delval = "1")
    private Integer isDeleted;

    /**
     * 来源：0：扫码，1：邀请
     */
    @TableField(exist = false)
    private Integer sourceCode;

    /**
     * 卷被数量
     */
    private Integer quiltNum;

    /**
     * 卷膜
     */
    private Integer filmNum;

    /**
     * 卷帘
     */
    private Integer blindNum;

    /** 温度上限(℃) */
    @Excel(name = "温度上限(℃)")
    private BigDecimal tempUp;

    /** 温度下限(℃) */
    @Excel(name = "温度下限(℃)")
    private BigDecimal tempLow;

    /** 湿度上限(%RH) */
    @Excel(name = "湿度上限(%RH)")
    private BigDecimal humiUp;

    /** 湿度下限(%RH) */
    @Excel(name = "湿度下限(%RH)")
    private BigDecimal humiLow;

    @TableField(exist = false)
    private String title;

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