package cn.iocoder.foodnexus.module.order.controller.app.customerOrder.vo;

import cn.iocoder.foodnexus.module.product.api.dto.ProductInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.math.BigDecimal;

@Schema(description = "管理后台 - 客户订单-子订单新增/修改 Request VO")
@Data
public class AppCustomerOrderItemSaveReqVO {

    @Schema(description = "商品id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9665")
    @NotNull(message = "商品id不能为空")
    private Long productId;

    @Schema(description = "订单商品单价，单位：分", hidden = true)
    private Integer orderItemPrice;

    @Schema(description = "订单商品总价，单位：分", hidden = true)
    private Integer orderItemTotal;

    @Schema(description = "市场价，单位使用：分", hidden = true)
    private Integer marketPrice;

    @Schema(description = "下浮率(%)", hidden = true)
    private BigDecimal discount;

    @Schema(description = "订单商品数量", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "订单商品数量不能为空")
    @Min(value = 1, message = "订单商品数量不能小于1")
    private Integer orderItemQuantity;

    @Schema(description = "商品对应供应商id", hidden = true)
    private Long supplierId;

    @Schema(description = "供应商名称", hidden = true)
    private String supplierName;

}