Добавлены not null аннотации на сущности
This commit is contained in:
@@ -3,6 +3,7 @@ package ru.serega6531.packmate.model;
|
||||
import lombok.*;
|
||||
import org.hibernate.Hibernate;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
@@ -19,6 +20,7 @@ public class CtfService {
|
||||
@Id
|
||||
private Integer port;
|
||||
|
||||
@Column(nullable = false)
|
||||
private String name;
|
||||
|
||||
private boolean decryptTls;
|
||||
|
||||
@@ -55,6 +55,7 @@ public class Packet {
|
||||
|
||||
private boolean tlsDecrypted;
|
||||
|
||||
@Column(nullable = false)
|
||||
private byte[] content;
|
||||
|
||||
@Transient
|
||||
|
||||
@@ -11,9 +11,7 @@ import ru.serega6531.packmate.model.enums.PatternActionType;
|
||||
import ru.serega6531.packmate.model.enums.PatternDirectionType;
|
||||
import ru.serega6531.packmate.model.enums.PatternSearchType;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.*;
|
||||
import java.util.Objects;
|
||||
|
||||
@Getter
|
||||
@@ -38,16 +36,25 @@ public class Pattern {
|
||||
|
||||
private boolean enabled;
|
||||
|
||||
@Column(nullable = false)
|
||||
private String name;
|
||||
|
||||
@Column(nullable = false)
|
||||
private String value;
|
||||
|
||||
@Column(nullable = false)
|
||||
private String color; // для вставки в css
|
||||
|
||||
@Enumerated
|
||||
@Column(nullable = false)
|
||||
private PatternSearchType searchType;
|
||||
|
||||
@Enumerated
|
||||
@Column(nullable = false)
|
||||
private PatternDirectionType directionType;
|
||||
|
||||
@Enumerated
|
||||
@Column(nullable = false)
|
||||
private PatternActionType actionType;
|
||||
|
||||
private Integer serviceId;
|
||||
|
||||
@@ -37,9 +37,11 @@ public class Stream {
|
||||
@GeneratedValue(generator = "stream_generator")
|
||||
private Long id;
|
||||
|
||||
@Column(name = "service_id")
|
||||
@Column(name = "service_id", nullable = false)
|
||||
private int service;
|
||||
|
||||
@Enumerated
|
||||
@Column(nullable = false)
|
||||
private Protocol protocol;
|
||||
|
||||
@OneToMany(mappedBy = "stream", cascade = CascadeType.ALL, orphanRemoval = true)
|
||||
@@ -62,7 +64,7 @@ public class Stream {
|
||||
|
||||
private boolean favorite;
|
||||
|
||||
@Column(columnDefinition = "smallint")
|
||||
@Column(nullable = false, columnDefinition = "smallint")
|
||||
private int ttl;
|
||||
|
||||
@Column(columnDefinition = "char(3)")
|
||||
|
||||
Reference in New Issue
Block a user