|
|
@@ -9,6 +9,8 @@ import javax.persistence.SequenceGenerator;
|
|
|
import javax.persistence.Table;
|
|
|
import javax.persistence.Transient;
|
|
|
|
|
|
+import org.codehaus.jackson.annotate.JsonIgnore;
|
|
|
+
|
|
|
@Entity
|
|
|
@Table(name = "attachs")
|
|
|
public class Attach {
|
|
|
@@ -39,7 +41,19 @@ public class Attach {
|
|
|
*/
|
|
|
@Column(name = "at_size")
|
|
|
private Long size;
|
|
|
-
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 关联的表
|
|
|
+ */
|
|
|
+ @Column(name = "rel_table")
|
|
|
+ private String relativeTable;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 关联的数据主键值
|
|
|
+ */
|
|
|
+ @Column(name = "rel_key")
|
|
|
+ private Long relativeKey;
|
|
|
+
|
|
|
@Transient
|
|
|
private String sourceId;
|
|
|
|
|
|
@@ -51,6 +65,7 @@ public class Attach {
|
|
|
this.id = id;
|
|
|
}
|
|
|
|
|
|
+ @JsonIgnore
|
|
|
public String getPath() {
|
|
|
return path;
|
|
|
}
|
|
|
@@ -59,6 +74,7 @@ public class Attach {
|
|
|
this.path = path;
|
|
|
}
|
|
|
|
|
|
+ @JsonIgnore
|
|
|
public String getDescription() {
|
|
|
return description;
|
|
|
}
|
|
|
@@ -83,6 +99,7 @@ public class Attach {
|
|
|
this.size = size;
|
|
|
}
|
|
|
|
|
|
+ @JsonIgnore
|
|
|
public String getSourceId() {
|
|
|
return sourceId;
|
|
|
}
|
|
|
@@ -91,6 +108,24 @@ public class Attach {
|
|
|
this.sourceId = sourceId;
|
|
|
}
|
|
|
|
|
|
+ @JsonIgnore
|
|
|
+ public String getRelativeTable() {
|
|
|
+ return relativeTable;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setRelativeTable(String relativeTable) {
|
|
|
+ this.relativeTable = relativeTable;
|
|
|
+ }
|
|
|
+
|
|
|
+ @JsonIgnore
|
|
|
+ public Long getRelativeKey() {
|
|
|
+ return relativeKey;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setRelativeKey(Long relativeKey) {
|
|
|
+ this.relativeKey = relativeKey;
|
|
|
+ }
|
|
|
+
|
|
|
public Attach() {
|
|
|
}
|
|
|
|