This commit is contained in:
crusader 2018-06-11 15:33:02 +09:00
parent 24825ba850
commit a490733ef6

View File

@ -3,6 +3,7 @@ package com.loafle.overflow.model.target;
import javax.persistence.*;
import com.loafle.overflow.model.infra.Infra;
import com.loafle.overflow.model.meta.MetaTargetType;
import com.loafle.overflow.model.sensor.Sensor;
import java.util.Date;
@ -17,6 +18,7 @@ public class Target {
private Long id;
private Infra infra;
private MetaTargetType metaTargetType;
private String name;
private String description;
private Integer sensorCount;
@ -86,6 +88,16 @@ public class Target {
this.infra = infra;
}
@ManyToOne
@JoinColumn(name = "META_TARGET_TYPE_ID", nullable = false)
public MetaTargetType getMetaTargetType() {
return metaTargetType;
}
public void setMetaTargetType(MetaTargetType metaTargetType) {
this.metaTargetType = metaTargetType;
}
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
public Date getCreateDate() {