Добавлено api пакетов
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package ru.serega6531.packmate.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
@@ -18,6 +19,7 @@ public class CtfService {
|
||||
private String name;
|
||||
|
||||
@OneToMany(mappedBy = "service", cascade = CascadeType.ALL, orphanRemoval = true)
|
||||
@JsonIgnore
|
||||
private List<Stream> streams;
|
||||
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
package ru.serega6531.packmate.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
|
||||
import javax.persistence.*;
|
||||
@@ -17,6 +20,8 @@ import javax.persistence.*;
|
||||
@org.hibernate.annotations.Parameter(name = "increment_size", value = "1")
|
||||
}
|
||||
)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class Packet {
|
||||
|
||||
@@ -25,10 +30,12 @@ public class Packet {
|
||||
private Long id;
|
||||
|
||||
@Transient
|
||||
@JsonIgnore
|
||||
private Long tempId;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "stream_id", nullable = false)
|
||||
@JsonIgnore
|
||||
private Stream stream;
|
||||
|
||||
private long timestamp;
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
package ru.serega6531.packmate.model;
|
||||
|
||||
public class Pagination {
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package ru.serega6531.packmate.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import ru.serega6531.packmate.Protocol;
|
||||
@@ -31,6 +32,7 @@ public class Stream {
|
||||
private Protocol protocol;
|
||||
|
||||
@OneToMany(mappedBy = "stream", cascade = CascadeType.ALL, orphanRemoval = true)
|
||||
@JsonIgnore
|
||||
private List<Packet> packets;
|
||||
|
||||
private long startTimestamp;
|
||||
|
||||
Reference in New Issue
Block a user