|
|
@ -0,0 +1,60 @@ |
|
|
|
package com.storeroom.modules.device.domain; |
|
|
|
|
|
|
|
|
|
|
|
import com.storeroom.base.BaseEntity; |
|
|
|
import io.swagger.annotations.ApiModelProperty; |
|
|
|
import lombok.Getter; |
|
|
|
import lombok.Setter; |
|
|
|
import org.hibernate.annotations.NotFound; |
|
|
|
import org.hibernate.annotations.NotFoundAction; |
|
|
|
|
|
|
|
import javax.persistence.*; |
|
|
|
import javax.validation.constraints.NotNull; |
|
|
|
import java.io.Serializable; |
|
|
|
import java.util.Objects; |
|
|
|
|
|
|
|
@Entity |
|
|
|
@Getter |
|
|
|
@Setter |
|
|
|
@Table(name = "camera_info") |
|
|
|
public class CameraInfo extends BaseEntity implements Serializable { |
|
|
|
|
|
|
|
@Id |
|
|
|
@Column(name = "id") |
|
|
|
@NotNull(groups = BaseEntity.Update.class) |
|
|
|
@ApiModelProperty(value = "ID", hidden = true) |
|
|
|
private String id; |
|
|
|
|
|
|
|
@ManyToOne(targetEntity = DeviceCamerBind.class) |
|
|
|
@ApiModelProperty(value = "设备配置") |
|
|
|
@NotFound(action = NotFoundAction.IGNORE) |
|
|
|
@JoinColumn(name = "device_camer_bind_id", referencedColumnName = "id") |
|
|
|
private DeviceCamerBind deviceCamerBindId; |
|
|
|
|
|
|
|
|
|
|
|
@Column(name = "description") |
|
|
|
@ApiModelProperty(value = "描述") |
|
|
|
private String description; |
|
|
|
|
|
|
|
|
|
|
|
@Column(name = "event") |
|
|
|
@ApiModelProperty(value = "事件") |
|
|
|
private String event; |
|
|
|
|
|
|
|
@Column(name = "event") |
|
|
|
@ApiModelProperty(value = "事件") |
|
|
|
private String downloadLink; |
|
|
|
|
|
|
|
@Override |
|
|
|
public boolean equals(Object o) { |
|
|
|
if (this == o) return true; |
|
|
|
if (o == null || getClass() != o.getClass()) return false; |
|
|
|
CameraInfo that = (CameraInfo) o; |
|
|
|
return Objects.equals(id, that.id) && Objects.equals(description, that.description) && Objects.equals(event, that.event) && Objects.equals(downloadLink, that.downloadLink); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public int hashCode() { |
|
|
|
return Objects.hash(id, description, event, downloadLink); |
|
|
|
} |
|
|
|
} |