package com.cyksj.model.request;

import com.cyksj.model.entity.GoodsClickUserOrderRecord;
import com.cyksj.model.entity.OrderDon;
import com.cyksj.model.manage.dto.GiftCardDto;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

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

/**
 * @author chan
 * @date 2021/10/11 下午4:10
 */
@Getter
@Setter
@ToString
public class OrderPayRequest {

    private Long userId;
    /**
     * 商品id
     */
    private Long skuId;

    /**
     * 座位id
     */
    private Long relationId;

    /**
     * 金额
     */
    @NotNull(message = "请输入金额")
    private BigDecimal donMoney;

    /**
     * 推荐人id
     */
    private Long sharedId;


    /**
     * 数量
     */
    private Integer num;

    /**
     * 提交账号
     */
    private String account;

    /**
     * 收获地址id
     */
    private Long addressId;

    private String type;

    /**
     * 优惠券id
     */
    private Long couponId;

    /**
     * 优惠券兑换码
     */
    private String couponExCode;

    /**
     * 渠道链接id
     */
    private Long popularizeId;

    /**
     * 文章id
     */
    private Long infoId;

    private Boolean isNoLogin = false;

    /**
     * 登录推广 不需要校验未支付订单订单
     */
    private Boolean isLoginPopularize;

    /**
     * 是否是网页端支付 默认0移动端支付
     */
    private Boolean isWebPay;

    /**
     * 订单来源
     */
    private OrderDon.Source source;

    /**
     * 优惠加购规格id
     */
    private List<Long> dpSkuIds;

    /**
     * 余额支付
     */
    private BigDecimal balance;

    /**
     * 银河币支付
     */
    private BigDecimal galaxyCoin;

    private String callback;

    private String callbackType;

    /**
     * 是否是特定价格
     */
    private Boolean isSpecificPrice;

    /**
     * 礼品卡购买
     */
    private GiftCardDto gcPayInfo;

    private Long goodsId;

    /**
     * 礼品卡现金支付
     */
    private BigDecimal gcCash;

    /**
     * 礼品卡现金支付所拥有id
     */
    private List<Long> gcpIds;

    /**
     * 店铺id
     */
    private String customId;

    /**
     * 购买实物
     */
    private Boolean isPayReal;

    /**
     * 雷达链接id
     */
    private Long radarId;

    /**
     * 下单手机号
     */
    private String phone;

    private String ip;

    private String location;

    /**
     * 是否设备满减活动优惠
     */
    private Boolean isAcReduce;

    /**
     * 百亿补贴规格id
     */
    private Long subsidyId;

    /**
     * 套餐id
     */
    private Long packageId;

    /**
     * 源订单id
     */
    private Long originalOrderId;

    /**
     * 是否是试用车票跳转
     */
    private Boolean isTrial;

    /**
     * 车票获取类型
     * 默认1购买,2.体验 3.镜像裂变
     */
    private Integer aqType;

    /**
     * 用户海报记录id
     */
    private Long rid;

    /**
     * 权益id
     */
    private Long benefitsId;

    /**
     * 店铺类型
     * 1.普通店铺（默认） 2.镜像店铺
     */
    private Integer cmt = 1;

    /**
     * 平台下单环境
     */
    private GoodsClickUserOrderRecord.EnvType envType;

    /**
     * 是否是银河币新入口续费
     */
    private RenewSource renewSource;

    @Getter
    public enum RenewSource{
        galaxyCoin("银河币"),
        ;
        String desc;

        RenewSource(String desc) {
            this.desc = desc;
        }
    }
}
