From a490733ef625c105d26abe2a128e00807c4f887f Mon Sep 17 00:00:00 2001 From: crusader Date: Mon, 11 Jun 2018 15:33:02 +0900 Subject: [PATCH] ing --- .../com/loafle/overflow/model/target/Target.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/com/loafle/overflow/model/target/Target.java b/src/main/java/com/loafle/overflow/model/target/Target.java index aa57273..e1a9500 100644 --- a/src/main/java/com/loafle/overflow/model/target/Target.java +++ b/src/main/java/com/loafle/overflow/model/target/Target.java @@ -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() {