Skip to content

Commit

Permalink
Annotations changed from NotNull to NotBlank, Min(0) to PositiveOrZero
Browse files Browse the repository at this point in the history
  • Loading branch information
viacheslav-torbin committed Oct 20, 2023
1 parent 21f4de4 commit 29e2ce8
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/main/java/org/bookstore/dto/CreateBookRequestDto.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
package org.bookstore.dto;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.PositiveOrZero;
import java.math.BigDecimal;
import lombok.Data;

@Data
public class CreateBookRequestDto {
private Long id;
@NotNull
@NotBlank
private String title;
@NotNull
@NotBlank
private String author;
@NotNull
@NotBlank
private String isbn;
@NotNull
@Min(0)
@PositiveOrZero
private BigDecimal price;
private String description;
private String coverImage;
Expand Down

0 comments on commit 29e2ce8

Please sign in to comment.