package cn.lihongjie.coal.emDeviceData.entity;

import cn.lihongjie.coal.annotation.HyperTable;
import cn.lihongjie.coal.base.entity.OrgCommonEntity;
import cn.lihongjie.coal.emDevice.entity.EmDeviceEntity;

import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.ManyToOne;

import lombok.Data;

import org.hibernate.annotations.Comment;

import java.time.LocalDateTime;

/**
 * pm25 float Pm2.5 pm10 float Pm10 noise float 噪声 tem float 温度 hum float 湿度 wp float 风力 ws float 风速
 * wd8 float 八风向 wd360 float 风向 tsp float 悬浮微粒 atm float 大气压 lux float 光照 co float 一氧化碳 so2 float
 * 二氧化硫 no2 float 二氧化氮 o3 float 臭氧
 */
@Data
@Entity
@HyperTable

@jakarta.persistence.Table(indexes = @jakarta.persistence.Index(name ="idx_em_device_data_org_id", columnList = "organization_id"))

public class EmDeviceDataEntity extends OrgCommonEntity {


    @ManyToOne(fetch = FetchType.LAZY)
    private EmDeviceEntity device;

    private LocalDateTime time;

    @Comment("Pm2.5")
    private Double pm25;

    @Comment("Pm10")
    private Double pm10;

    @Comment("噪声")
    private Double noise;

    @Comment("温度")
    private Double tem;

    @Comment("湿度")
    private Double hum;

    @Comment("风力")
    private Double wp;

    @Comment("风速")
    private Double ws;

    @Comment("八风向")
    private Double wd8;

    @Comment("风向")
    private Double wd360;

    @Comment("悬浮微粒")
    private Double tsp;

    @Comment("大气压")
    private Double atm;

    @Comment("光照")
    private Double lux;

    @Comment("一氧化碳")
    private Double co;

    @Comment("二氧化硫")
    private Double so2;

    @Comment("二氧化氮")
    private Double no2;

    @Comment("臭氧")
    private Double o3;

    @Comment("报警标记")
    private Long alterMask;

}