Se agregan anotaciones de validación en DtoUzyTavDepCenProy y ModelUzyTavDepCenProy

parent abbc23ae
......@@ -3,12 +3,20 @@ package ec.edu.espe.movilidad.MovilidadWS.Dto;
import lombok.Data;
import javax.validation.constraints.Positive;
import javax.validation.constraints.Size;
@Data
public class DtoUzyTavDepCenProy {
private Long UZYTAVDEPCENPROY_ID;
private String STVSUBJ_CODE_DEPTO;
private String STVMAJR_CODE_CAR;
private Long UZYTAVPROGRAMA_V_ID;
private String STVCAMP_CODE;
@Positive(message = "El campo uzytavdepcenproy_id debe ser un número positivo")
private Long uzytavdepcenproy_id;
@Size(max = 4)
private String stvsubj_code_depto;
@Size(max = 4)
private String stvmajr_code_car;
@Positive(message = "El campo uzytavprograma_v_id debe ser un número positivo")
private Long uzytavprograma_v_id;
@Size(max = 3)
private String stvcamp_code;
}
......@@ -11,23 +11,23 @@ import javax.validation.constraints.Size;
public class ModelUzyTavDepCenProy {
@Id
@Column(name = "UZYTAVDEPCENPROY_ID")
private Long UZYTAVDEPCENPROY_ID;
@Column(name = "uzytavdepcenproy_id")
private Long uzytavdepcenproy_id;
@Size(max = 4)
@Column(name = "STVSUBJ_CODE_DEPTO", length = 4)
private String STVSUBJ_CODE_DEPTO;
@Column(name = "stvsubj_code_depto", length = 4)
private String stvsubj_code_depto;
@Size(max = 4)
@Column(name = "STVMAJR_CODE_CAR", length = 4)
private String STVMAJR_CODE_CAR;
@Column(name = "stvmajr_code_car", length = 4)
private String stvmajr_code_car;
//RELACIÓN CON PROGRAMA-TABLA PADRE
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "UZYTAVPROGRAMA_V_ID")
@JoinColumn(name = "uzytavprograma_v_id")
private ModelUzyTavPrograma_V uzytavprograma_v;
@Size(max = 3)
@Column(name = "STVCAMP_CODE", length = 3)
private String STVCAMP_CODE;
@Column(name = "stvcamp_code", length = 3)
private String stvcamp_code;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment