package com.gkhy.fourierSpecialGasMonitor.entity; import lombok.Data; import org.hibernate.annotations.Fetch; import org.hibernate.annotations.FetchMode; import javax.persistence.*; import java.time.LocalDateTime; import java.util.List; /** * @author Mr.huang * @decription * @date 2023/8/9 16:34 */ @Entity @Table(name = "gas_warn_log") @Data public class GasWarnLog { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String content; private LocalDateTime warnTime; private Integer gasCategoryId; private String gasMolecularFormula; private String gasName; private String gasUnit; private Double gasConcentrationThreshold; private Double gasConcentration; private Integer gasThresholdId; private String gasThresholdName; private Byte status; private Long handlerId; private String handlerName; private String handlerDesc; private String handlerRealName; private LocalDateTime handlerTime; @OneToMany(fetch = FetchType.EAGER,cascade = {CascadeType.REFRESH}) @Fetch(FetchMode.SUBSELECT) @JoinColumn(name = "warnLogId",referencedColumnName = "id",insertable =false ,updatable = false) private List gasWarnLogSmsUsers; }