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