Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
@AllArgsConstructor
public class ProductCreateRequestDto {

@NotBlank
@NotBlank(message = "상품명은 필수입니다.")
private String name;

@NotNull(message = "가격은 필수입니다.")
@Positive(message = "가격은 0보다 커야 합니다.")
private Integer price;

@NotBlank
@NotBlank(message = "상품 카테고리는 필수입니다.")
private String productCategory;

private String description;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
package com.babjo.deliverycommerce.domain.product.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;
import lombok.Getter;

@Getter
public class ProductUpdateRequestDto {

@NotBlank
@NotBlank(message = "상품명은 필수입니다.")
private String name;

@NotNull(message = "가격은 필수입니다.")
@Positive(message = "가격은 0보다 커야 합니다.")
private Integer price;

@NotBlank
@NotBlank(message = "상품 카테고리는 필수입니다.")
private String productCategory;

private String description;
Expand Down
Loading