[FIX] missing string size checker
This commit is contained in:
parent
510553550f
commit
69880df4aa
@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonInclude;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Table;
|
import jakarta.persistence.Table;
|
||||||
|
import jakarta.validation.constraints.Size;
|
||||||
|
|
||||||
@Table(name = "data")
|
@Table(name = "data")
|
||||||
@DataIfNotExists
|
@DataIfNotExists
|
||||||
@ -14,9 +15,11 @@ import jakarta.persistence.Table;
|
|||||||
public class Data extends OIDGenericDataSoftDelete {
|
public class Data extends OIDGenericDataSoftDelete {
|
||||||
@Column(length = 128, nullable = false)
|
@Column(length = 128, nullable = false)
|
||||||
@Schema(description = "Sha512 of the data")
|
@Schema(description = "Sha512 of the data")
|
||||||
|
@Size(max = 512)
|
||||||
public String sha512;
|
public String sha512;
|
||||||
@Column(length = 128, nullable = false)
|
@Column(length = 128, nullable = false)
|
||||||
@Schema(description = "Mime -type of the media")
|
@Schema(description = "Mime -type of the media")
|
||||||
|
@Size(max = 512)
|
||||||
public String mimeType;
|
public String mimeType;
|
||||||
@Column(nullable = false)
|
@Column(nullable = false)
|
||||||
@Schema(description = "Size in Byte of the data")
|
@Schema(description = "Size in Byte of the data")
|
||||||
|
@ -51,6 +51,7 @@ public class User extends GenericDataSoftDelete {
|
|||||||
@Nullable
|
@Nullable
|
||||||
public Boolean blocked = false;
|
public Boolean blocked = false;
|
||||||
@Column(length = 512)
|
@Column(length = 512)
|
||||||
|
@Size(max = 512)
|
||||||
public String blockedReason;
|
public String blockedReason;
|
||||||
|
|
||||||
@Schema(description = "List of Id of the specific covers")
|
@Schema(description = "List of Id of the specific covers")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user