From e5011110e7d3a738f19d52d20c7abebe31c1fce9 Mon Sep 17 00:00:00 2001 From: omenem Date: Sun, 12 Apr 2020 18:35:22 +0200 Subject: [PATCH] Added fields tags (@NotNull etc...) also so CurtainSaveRequest --- .../sa4/sanmarinoes/smarthut/dto/CurtainsSaveRequest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/dto/CurtainsSaveRequest.java b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/dto/CurtainsSaveRequest.java index 876d770..1dc9122 100644 --- a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/dto/CurtainsSaveRequest.java +++ b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/dto/CurtainsSaveRequest.java @@ -1,13 +1,18 @@ package ch.usi.inf.sa4.sanmarinoes.smarthut.dto; +import javax.validation.constraints.Max; +import javax.validation.constraints.Min; import javax.validation.constraints.NotNull; public class CurtainsSaveRequest { /** The state of this switch */ + @NotNull + @Min(0) + @Max(100) private int openedAmount; /** Device identifier */ - private long id; + @NotNull private long id; /** * The room this device belongs in, as a foreign key id. To use when updating and inserting from