/*
 * Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
 *
 * https://www.gz-yami.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */

package com.yami.shop.bean.app.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

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

/**
 * 订单下的每个店铺
 *
 * @author YaMi
 */
@Data
public class OrderShopDto implements Serializable {

    /**
     * 店铺ID
     **/
    @ApiModelProperty(value = "店铺id", required = true)
    private Long shopId;

    /**
     * 店铺名称
     **/
    @ApiModelProperty(value = "店铺名称", required = true)
    private String shopName;

    @ApiModelProperty(value = "实际总值", required = true)
    private Double actualTotal;

    @ApiModelProperty(value = "商品总值", required = true)
    private Double total;

    @ApiModelProperty(value = "商品总数", required = true)
    private Integer totalNum;

    @ApiModelProperty(value = "地址Dto", required = true)
    private UserAddrDto userAddrDto;

    @ApiModelProperty(value = "支付方式",required=true)
    private Integer payType;

    @ApiModelProperty(value = "产品信息", required = true)
    private List<OrderItemDto> orderItemDtos;

    @ApiModelProperty(value = "运费", required = true)
    private Double transfee;

    @ApiModelProperty(value = "使用积分换算的钱", required = true)
    private Double reduceAmount= 0.0;

    @ApiModelProperty(value = "整个订单使用的积分数", required = true)
    private Double totalUsableScore=0.0;

    @ApiModelProperty(value = "所有可用积分")
    private Long totalAvailableScore=0L;

    @ApiModelProperty(value = "促销活动优惠金额", required = true)
    private Double discountMoney;

    @ApiModelProperty(value = "优惠券优惠金额", required = true)
    private Double couponMoney;


    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "订单创建时间", required = true)
    private Date createTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "订单付款时间", required = false)
    private Date payTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "订单发货时间", required = false)
    private Date dvyTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "订单完成时间", required = false)
    private Date fianllyTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "订单取消时间", required = false)
    private Date cancelTime;

    @ApiModelProperty(value = "订单取消原因", required = true)
    private String cancelReason;


    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "订单更新时间", required = false)
    private Date updateTime;

    /**
     * 订单备注信息
     */
    @ApiModelProperty(value = "订单备注信息", required = true)
    private String remarks;

    /**
     * 配送类型
     */
    @ApiModelProperty(value = "配送类型 1:快递 2:自提 3：无需快递", required = true)
    private Integer dvyType;

    @ApiModelProperty(value = "物流单号", required = true)
    private String dvyFlowId;

    @ApiModelProperty(value = "物流公司名称", required = true)
    private String dvyName;

    /**
     * 订单类型1团购订单 2秒杀订单
     */
    @ApiModelProperty(value = "订单类型（1团购订单 2秒杀订单）", required = true)
    private Integer orderType;

    /**
     * 订单状态
     */
    @ApiModelProperty(value = "订单状态", required = true)
    private Integer status;

    @ApiModelProperty(value = "能否退款", required = true)
    private Boolean canRefund = false;

    @ApiModelProperty(value = "能否整单退款", required = true)
    private Boolean canAllRefund = false;

    @ApiModelProperty(value = "订单积分")
    private Integer orderScore = 0;

    @ApiModelProperty(value = "订单预计送达日期", required = true, example = "3月8日")
    private String estimatedTimeStr;

    @ApiModelProperty(value = "订单预计送达时间", required = true, example = "10:40")
    private String estimatedTime;

    /**
     * 评论状态： 0 未评价  1 已评价
     */
    @ApiModelProperty(value = "评论状态： 0 未评价  1 已评价")
    private Integer commSts;
}
