package com.yonge.cooleshow.biz.dal.dto.req;

import com.yonge.cooleshow.biz.dal.enums.GoodTypeEnum;
import com.yonge.cooleshow.biz.dal.enums.OrderTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

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

/**
 * 下单请求
 *
 * @Author: liweifan
 * @Data: 2022/3/31 14:55
 */
@ApiModel(value = "OrderReq对象", description = "下单请求")
public class OrderReq {
    @ApiModelProperty(value = "用户id ")
    private Long userId;
    @NotBlank(message = "订单名称不能为空")
    @ApiModelProperty(value = "订单名称 ", required = true)
    private String orderName;
    @NotNull(message = "订单类型不能为空")
    @ApiModelProperty(value = "订单类型:  VIP、开通会员  PRACTICE、陪练课购买  LIVE、直播课购买 VIDEO、视频课购买 MUSIC、单曲点播 ", required = true)
    private OrderTypeEnum orderType;
    @ApiModelProperty(value = "订单描述信息 ")
    private String orderDesc;
    @ApiModelProperty("用户备注 ")
    private String userNote;
    @ApiModelProperty(value = "优惠券id")
    private Long couponId;
    @NotNull(message = "订单金额不能为空")
    @ApiModelProperty(value = "订单金额", required = true)
    private BigDecimal actualPrice;
    @NotNull(message = "商品详情不能为空")
    @ApiModelProperty(value = "业务请求详情", required = true)
    private List<OrderReqInfo> orderInfos;

    @ApiModel(value = "OrderReqInfo对象", description = "下单请求业务详情对象")
    public class OrderReqInfo {
        private Long userId;
        private String orderNo;
        @NotNull(message = "商品类型不能为空")
        @ApiModelProperty(value = "商品类型:  VIP、开通会员  PRACTICE、陪练课购买  LIVE、直播课购买 VIDEO、视频课购买 MUSIC、单曲点播 ", required = true)
        private GoodTypeEnum goodType;
        @ApiModelProperty("商品名称 ")
        private String goodName;
        @ApiModelProperty(value = "优惠券id")
        private Long couponId;
        @ApiModelProperty(value = "业务内容")
        private Object bizContent;

        public Long getUserId() {
            return userId;
        }

        public void setUserId(Long userId) {
            this.userId = userId;
        }

        public String getOrderNo() {
            return orderNo;
        }

        public void setOrderNo(String orderNo) {
            this.orderNo = orderNo;
        }

        public GoodTypeEnum getGoodType() {
            return goodType;
        }

        public void setGoodType(GoodTypeEnum goodType) {
            this.goodType = goodType;
        }

        public Object getBizContent() {
            return bizContent;
        }

        public void setBizContent(Object bizContent) {
            this.bizContent = bizContent;
        }

        public String getGoodName() {
            return goodName;
        }

        public void setGoodName(String goodName) {
            this.goodName = goodName;
        }

        public Long getCouponId() {
            return couponId;
        }

        public void setCouponId(Long couponId) {
            this.couponId = couponId;
        }
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getOrderName() {
        return orderName;
    }

    public void setOrderName(String orderName) {
        this.orderName = orderName;
    }

    public OrderTypeEnum getOrderType() {
        return orderType;
    }

    public void setOrderType(OrderTypeEnum orderType) {
        this.orderType = orderType;
    }

    public String getOrderDesc() {
        return orderDesc;
    }

    public void setOrderDesc(String orderDesc) {
        this.orderDesc = orderDesc;
    }

    public List<OrderReqInfo> getOrderInfos() {
        return orderInfos;
    }

    public void setOrderInfos(List<OrderReqInfo> orderInfos) {
        this.orderInfos = orderInfos;
    }

    public String getUserNote() {
        return userNote;
    }

    public void setUserNote(String userNote) {
        this.userNote = userNote;
    }

    public Long getCouponId() {
        return couponId;
    }

    public void setCouponId(Long couponId) {
        this.couponId = couponId;
    }

    public BigDecimal getActualPrice() {
        return actualPrice;
    }

    public void setActualPrice(BigDecimal actualPrice) {
        this.actualPrice = actualPrice;
    }


}
