
package com.tmerclub.cloud.common.order.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 订单参数
 *
 * @author tmerclub
 * @date 2020-12-04 11:27:35
 */
public class OrderDTO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    @Schema(description = "立即购买时提交的商品项,如果该值为空，则说明是从购物车进入，如果该值不为空则说明为立即购买")
    private ShopCartItemDTO shopCartItem;

    @Schema(description = "地址ID，0为默认地址")
    @NotNull(message = "地址不能为空")
    private Long addrId;

    @Schema(description = "多店铺的商品配送方式")
    private List<DvyTypeDTO> dvyTypes;

    @Schema(description = "用户是否改变了优惠券的选择，如果用户改变了优惠券的选择，则完全根据传入参数进行优惠券的选择")
    private Integer userChangeCoupon;

    @Schema(description = "优惠券id数组")
    private List<Long> couponIds;

    @Schema(description = "用户是否选择积分抵现(0不使用 1使用 默认不使用)")
    private Integer isScorePay;

    @Schema(description = "用户是否自己选择使用多少积分，为空则为默认全部使用")
    private Long userUseScore;

    @Schema(description = "支付起始时间")
    private Date beginPayTime;

    @Schema(description = "是否是成功支付状态")
    private Boolean isSuccessPayStatus;

    public Long getAddrId() {
        return addrId;
    }

    public void setAddrId(Long addrId) {
        this.addrId = addrId;
    }

    public Integer getUserChangeCoupon() {
        return userChangeCoupon;
    }

    public void setUserChangeCoupon(Integer userChangeCoupon) {
        this.userChangeCoupon = userChangeCoupon;
    }

    public List<Long> getCouponIds() {
        return couponIds;
    }

    public void setCouponIds(List<Long> couponIds) {
        this.couponIds = couponIds;
    }

    public Integer getIsScorePay() {
        return isScorePay;
    }

    public void setIsScorePay(Integer isScorePay) {
        this.isScorePay = isScorePay;
    }

    public Long getUserUseScore() {
        return userUseScore;
    }

    public void setUserUseScore(Long userUseScore) {
        this.userUseScore = userUseScore;
    }

    public ShopCartItemDTO getShopCartItem() {
        return shopCartItem;
    }

    public void setShopCartItem(ShopCartItemDTO shopCartItem) {
        this.shopCartItem = shopCartItem;
    }

    public Date getBeginPayTime() {
        return beginPayTime;
    }

    public void setBeginPayTime(Date beginPayTime) {
        this.beginPayTime = beginPayTime;
    }

    public Boolean getSuccessPayStatus() {
        return isSuccessPayStatus;
    }

    public void setSuccessPayStatus(Boolean successPayStatus) {
        isSuccessPayStatus = successPayStatus;
    }

    public void setDvyTypes(List<DvyTypeDTO> dvyTypes) {
        this.dvyTypes = dvyTypes;
    }

    public List<DvyTypeDTO> getDvyTypes() {
        return dvyTypes;
    }

    @Override
    public String toString() {
        return "OrderDTO{" +
                "shopCartItem=" + shopCartItem +
                ", addrId=" + addrId +
                ", dvyTypes=" + dvyTypes +
                ", userChangeCoupon=" + userChangeCoupon +
                ", couponIds=" + couponIds +
                ", isScorePay=" + isScorePay +
                ", userUseScore=" + userUseScore +
                ", beginPayTime=" + beginPayTime +
                ", isSuccessPayStatus=" + isSuccessPayStatus +
                '}';
    }
}
