package com.wzj.soopin.order.domain.dto;

import com.wzj.soopin.goods.domain.entity.Product;
import com.wzj.soopin.goods.domain.entity.Sku;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;


/**
 * 创建订单请求VO
 * @author Jinxin
 *
 */
@Data
@Schema(description = "创建订单请求VO")
public class OrderProductListDTO {
    @Schema(description = "商品skuId", required = true)
    @NotNull(message = "商品skuId不能为空")
    private Long skuId;

    @Schema(description = "数量", required = true)
    @NotNull(message = "数量不能为空")
    @Min(value = 1, message = "数量不能小于1")
    private Integer quantity;

    @Schema(description = "消费金", hidden = true)
    private BigDecimal consumption;

    @Schema(description = "运费", hidden = true)
    private BigDecimal freightAmount;

    @Schema(description = "隐藏 业务过程中的数据", hidden = true)
    private Sku sku;

    @Schema(description = "隐藏 业务过程中的数据", hidden = true)
    private Product product;
}
