Added fields tags (@NotNull etc...) also so CurtainSaveRequest

This commit is contained in:
omenem 2020-04-12 18:35:22 +02:00
parent 831a2d07c6
commit e5011110e7

View file

@ -1,13 +1,18 @@
package ch.usi.inf.sa4.sanmarinoes.smarthut.dto; package ch.usi.inf.sa4.sanmarinoes.smarthut.dto;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
public class CurtainsSaveRequest { public class CurtainsSaveRequest {
/** The state of this switch */ /** The state of this switch */
@NotNull
@Min(0)
@Max(100)
private int openedAmount; private int openedAmount;
/** Device identifier */ /** 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 * The room this device belongs in, as a foreign key id. To use when updating and inserting from