Skip to content

Commit

Permalink
Added validation closes #8
Browse files Browse the repository at this point in the history
  • Loading branch information
springframeworkguru committed May 19, 2019
1 parent 1b36445 commit 8081fe2
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import javax.validation.constraints.Positive;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
import java.util.UUID;
Expand All @@ -18,18 +22,31 @@
@AllArgsConstructor
@Builder
public class BeerDto {

@Null
private UUID id;

@Null
private Integer version;

@Null
private OffsetDateTime createdDate;

@Null
private OffsetDateTime lastModifiedDate;

@NotBlank
private String beerName;

@NotNull
private BeerStyleEnum beerStyle;

@Positive
@NotNull
private Long upc;

@Positive
@NotNull
private BigDecimal price;

private Integer quantityOnHand;
Expand Down

0 comments on commit 8081fe2

Please sign in to comment.