Browse Source

commit code

master
刘力 3 years ago
parent
commit
52fed532bf
  1. 53
      storeroom/src/main/java/com/storeroom/modules/device/domain/AlarmInfo.java

53
storeroom/src/main/java/com/storeroom/modules/device/domain/AlarmInfo.java

@ -0,0 +1,53 @@
package com.storeroom.modules.device.domain;
import com.storeroom.base.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Objects;
@Entity
@Getter
@Setter
@Table(name = "alarmInfo")
public class AlarmInfo extends BaseEntity implements Serializable {
@Id
@Column(name = "id")
@NotNull(groups = Update.class)
@ApiModelProperty(value = "报警信息id", hidden = true)
private String id;
@Column(name = "device_info_id")
@ApiModelProperty(value = "设备信息id")
private String deviceInfoId;
@Column(name = "location")
@ApiModelProperty(value = "报警位置")
private String location;
@Column(name = "description")
@ApiModelProperty(value = "描述")
private String description;
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
AlarmInfo alarmInfo = (AlarmInfo) o;
return Objects.equals(id, alarmInfo.id) && Objects.equals(deviceInfoId, alarmInfo.deviceInfoId) && Objects.equals(location, alarmInfo.location) && Objects.equals(description, alarmInfo.description);
}
@Override
public int hashCode() {
return Objects.hash(id, deviceInfoId, location, description);
}
}
Loading…
Cancel
Save