
package com.tmerclub.cloud.order.vo;

import com.tmerclub.cloud.common.order.vo.OrderItemVO;
import com.tmerclub.cloud.common.vo.BaseVO;
import com.tmerclub.cloud.api.payment.constant.PaySysType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;

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

/**
 * 订单和订单预售信息
 *
 * @author lhd
 * @date 2022-08-22 14:13:50
 */
@Data
@ToString
public class OrderAndPreSaleVO extends BaseVO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    @Schema(description = "订单ID")
    private Long orderId;

    @Schema(description = "店铺id")
    private Long shopId;

    @Schema(description = "用户ID")
    private Long userId;

    @Schema(description = "用户订单地址Id")
    private Long orderAddrId;

    @Schema(description = "店铺名称")
    private String shopName;

    /**
     * 支付系统类型
     *
     * @see PaySysType
     */
    @Schema(description = "支付系统类型 0默认 1通联")
    private Integer paySysType;

    @Schema(description = "总值")
    private Long total;

    @Schema(description = "实际总值")
    private Long actualTotal;

    @Schema(description = "订单使用积分")
    private Long orderScore;

    @Schema(description = "买家备注")
    private String remarks;

    @Schema(description = "卖家备注")
    private String shopRemarks;

    @Schema(description = "订单状态 1:待付款 2:待发货(待自提) 3:待收货(已发货) 5:成功 6:失败 7:待成团")
    private Integer status;

    @Schema(description = "支付方式 请参考枚举PayType")
    private Integer payType;

    @Schema(description = "配送类型 1:快递 2:自提 3：无需快递 4同城配送")
    private Integer deliveryType;

    @Schema(description = "订单类型1团购订单 2秒杀订单 3积分订单")
    private Integer orderType;

    @Schema(description = "订单关闭原因 1-超时未支付 2-退款关闭 4-买家取消 15-已通过货到付款交易")
    private Integer closeType;

    @Schema(description = "订单商品总数")
    private Integer allCount;

    @Schema(description = "付款时间")
    private Date payTime;

    @Schema(description = "发货时间")
    private Date deliveryTime;

    @Schema(description = "完成时间")
    private Date finallyTime;

    @Schema(description = "取消时间")
    private Date cancelTime;

    @Schema(description = "预售发货时间")
    private Date bookTime;

    @Schema(description = "是否已支付，1.已支付0.未支付")
    private Integer isPayed;

    @Schema(description = "用户订单删除状态，0：没有删除， 1：回收站， 2：永久删除")
    private Integer deleteStatus;

    @Schema(description = "订单退款状态（1:申请退款 2:退款成功 3:部分退款成功 4:退款失败）")
    private Integer refundStatus;

    @Schema(description = "订单运费")
    private Long freightAmount;

    @Schema(description = "积分抵扣金额")
    private Long scoreAmount;

    @Schema(description = "会员折扣金额")
    private Long memberAmount;

    @Schema(description = "平台优惠券优惠金额")
    private Long platformCouponAmount;

    @Schema(description = "商家优惠券优惠金额")
    private Long shopCouponAmount;

    @Schema(description = "满减优惠金额")
    private Long discountAmount;

    @Schema(description = "平台优惠金额")
    private Long platformAmount;

    @Schema(description = "平台运费减免金额")
    private Long platformFreeFreightAmount;

    @Schema(description = "优惠总额")
    private Long reduceAmount;

    @Schema(description = "供应商id")
    private Long supplierId;

    @Schema(description = "供应商商品发货方式 1.供应商发货 2.仓库发货")
    private Integer supplierDeliveryType;

    @Schema(description = "定金金额")
    private Long depositAmount;
    @Schema(description = "尾款金额")
    private Long balanceAmount;

    @Schema(description = "预售类型  -1：未开启 0.全款预售 1.定金预售")
    private Integer preSaleType;

    @Schema(description = "订单项")
    private List<OrderItemVO> orderItems;

}
