-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added dependency, CreateBookRequestDto converted to record
- Loading branch information
1 parent
29e2ce8
commit 553a5b1
Showing
2 changed files
with
14 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 12 additions & 12 deletions
24
src/main/java/org/bookstore/dto/CreateBookRequestDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
package org.bookstore.dto; | ||
|
||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.NotNull; | ||
import jakarta.validation.constraints.PositiveOrZero; | ||
import java.math.BigDecimal; | ||
import lombok.Data; | ||
|
||
@Data | ||
public class CreateBookRequestDto { | ||
private Long id; | ||
public record CreateBookRequestDto( | ||
Long id, | ||
@NotBlank String title, | ||
@NotBlank | ||
private String title; | ||
String author, | ||
@NotBlank | ||
private String author; | ||
@NotBlank | ||
private String isbn; | ||
String isbn, | ||
@NotNull | ||
@PositiveOrZero | ||
private BigDecimal price; | ||
private String description; | ||
private String coverImage; | ||
} | ||
BigDecimal price, | ||
String description, | ||
String coverImage | ||
) | ||
{} |