|
|
@@ -8,9 +8,7 @@ import lombok.Setter;
|
|
|
import org.hibernate.annotations.LazyCollection;
|
|
|
import org.hibernate.annotations.LazyCollectionOption;
|
|
|
|
|
|
-import javax.persistence.Column;
|
|
|
-import javax.persistence.ElementCollection;
|
|
|
-import javax.persistence.Entity;
|
|
|
+import javax.persistence.*;
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
import java.util.List;
|
|
|
import java.util.stream.Collectors;
|
|
|
@@ -23,6 +21,7 @@ import java.util.stream.Collectors;
|
|
|
@Getter
|
|
|
@Setter
|
|
|
@Entity
|
|
|
+@Table(name = "oss_store_node")
|
|
|
public class StoreNode extends BaseEntity {
|
|
|
@Column(nullable = false, unique = true)
|
|
|
private String nodeAddr;
|
|
|
@@ -32,6 +31,7 @@ public class StoreNode extends BaseEntity {
|
|
|
private Integer rpcPort;
|
|
|
@ElementCollection(targetClass = StoreDisk.class)
|
|
|
@LazyCollection(LazyCollectionOption.FALSE)
|
|
|
+ @CollectionTable(name = "oss_store_node_disks")
|
|
|
private List<StoreDisk> storeDisks;
|
|
|
private Boolean enabled;
|
|
|
|