Добавлены DTO для всех entity

This commit is contained in:
serega6531
2020-12-29 14:36:17 +03:00
parent 19ccd3f200
commit 625848cf23
17 changed files with 179 additions and 46 deletions

View File

@@ -1,6 +1,5 @@
package ru.serega6531.packmate.model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -32,16 +31,13 @@ public class Packet {
private Long id;
@Transient
@JsonIgnore
private Long tempId;
@Transient
@JsonIgnore
private byte ttl;
@ManyToOne
@JoinColumn(name = "stream_id", nullable = false)
@JsonIgnore
private Stream stream;
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@@ -60,7 +56,6 @@ public class Packet {
private byte[] content;
@Transient
@JsonIgnore
public String getContentString() {
return new String(content);
}