package com.example.scaffold.dto;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;

/**
 * 产品创建请求 DTO
 */
@Data
public class ProductCreateRequest {
    
    @NotNull(message = "产品名称不能为空")
    private String name;
    
    private String description;
    
    @NotNull(message = "价格不能为空")
    @Min(value = 0, message = "价格不能为负数")
    private BigDecimal price;
    
    @Min(value = 0, message = "库存不能为负数")
    private Integer stockQuantity = 0;
    
    private String category;
}