package com.cpop.mall.business.bo;

import com.cpop.core.annontation.StringArrayConvert;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author DB
 * @createTime 2023/11/06 11:13
 * @description
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "商城预订单对象")
public class AdvanceOrderBo implements Serializable {

    /**
     * 总金额
     */
    @NotNull(message = "总金额不能为空")
    @ApiModelProperty(value = "总金额",required = true)
    private BigDecimal totalAmount;

    /**
     * 总积分
     */
    @NotNull(message = "总积分不能为空")
    @ApiModelProperty(value = "总积分",required = true)
    private Long totalPoint;

    /**
     * 当前订单所有产品名
     */
    @StringArrayConvert
    @ApiModelProperty(value = "当前订单所有产品名")
    private String productNames;

    /**
     * 支付类型
     */
    @NotNull(message = "支付类型不能为空")
    @ApiModelProperty(value = "支付方式(0:微信支付;1:积分支付)",required = true)
    private Integer payType;

    /**
     * 支付用户名
     */
    @ApiModelProperty(value = "支付用户名")
    private String payUserName;

    /**
     * 购物车ids
     */
    @ApiModelProperty(value = "购物车ids")
    private List<String> shoppingCartIds;

    /**
     * 订单详情
     */
    @NotEmpty(message = "订单详情不能为空")
    @ApiModelProperty(value = "订单详情",required = true)
    private List<OrderDetailBo> orderDetailList;
}
