package com.tashow.cloud.trade.controller.admin.order.vo;


import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.tashow.cloud.common.util.json.databind.StringLocalDateTimeSerializer;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

// 管理后台 - 交易订单的分页项 Response VO
@Data
public class TradeOrderPageRespVO extends TradeOrderBaseVO {

    //订单项列表
    private List<Item> items;
    //店铺名称
    private String shopName;
    //店铺log
    private String shopLogo;
    //支付剩余时间 单位秒
    private Long payLastTime;
    //财务状态
    private Integer financeStatus;
    //售后状态
    private Integer afterSaleStatus;
    //订单类目
    private String orderCategoryName;
    //用户备注
    private String userRemark;
    //支付方式
    private Integer payType;


    @Data
    public static class Item {
        //商品图片
        private String picUrl;
        //商品名称
        private String spuName;
        //商品规格
        private String skuName;
        // 购买的商品数量
        private Integer count;
        // 订单总价
        private Integer price;
        // 订单优惠金额
        private Integer discountPrice;
        //到手价
        private Integer handedPrice;
        //实付金额
        private Integer payPrice;
        // 单位
        private String unit;
        //预约时间
        @JsonSerialize(using = StringLocalDateTimeSerializer.class)
        private LocalDateTime subTime;
        //服务地址
        private String serveAddress;
    }

}
