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

// 移除Swagger相关导入

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.tashow.cloud.common.util.json.databind.StringLocalDateTimeSerializer;
import lombok.Data;
import lombok.experimental.Accessors;

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

// 管理后台 - 交易订单的详情 Response VO
@Data
@Accessors(chain = true)
public class TradeOrderDetailRespVO extends TradeOrderBaseVO{

    //订单类目id
    private Long orderCategoryId;
    //订单类目名称
    private String orderCategoryName;

    //取消原因
    private String cancelReason;
    //取消备注
    private String cancelRemark;
    //商家备注
    private String merchantRemark;
    //退款时间
    @JsonSerialize(using = StringLocalDateTimeSerializer.class)
    private LocalDateTime refundTime;
    //售后保障时间
    @JsonSerialize(using = StringLocalDateTimeSerializer.class)
    private LocalDateTime propertyTime;
    //售后保障状态
    private Integer propertyStatus;
    //订单金额
    private Integer price;
    //实付金额
    private Integer payPrice;
    //优惠金额
    private Integer discountPrice;
    //退款金额
    private Integer refundPrice;
    //实收金额
    private Integer livePrice;
    //支付方式
    private Integer payType;
    //支付渠道 （线上线下）
    private Integer payChannelCode;
    //倒计时()
    private String payLastTime;
    //财务状态
    private Integer financeStatus;
    //交易流水号
    private String payOrderId;
    //支付时间
    @JsonSerialize(using = StringLocalDateTimeSerializer.class)
    private LocalDateTime payTime;
    //取消时间
    @JsonSerialize(using = StringLocalDateTimeSerializer.class)
    private LocalDateTime cancelTime;
    //订单状态流转记录
    List<TradeOrderStatusRespVo> statusList;
    //商品列表
    private List<Item> items;

    //服务信息(order_serve_info配置)
    private JSONObject tradeServeInfo;
    //扩展服务信息(order_serve_info配置)
    private JSONArray tradeExtendServeInfo;
    //附加费信息(order_serve_info配置)
    private JSONArray tradeExtendCostInfo;

    @Data
    public static class Item {

        //店铺名称
        private Long id;
        //店铺名称
        private String shopName;
        //店铺logo
        private String shopLogo;
        //商品id
        private Long spuId;
        //skuId
        private Long skuId;
        //商品图片
        private String picUrl;
        //商品名称
        private String spuName;
        //商品规格
        private String skuName;
        //订单类目id
        private Long orderCategoryId;
        //订单类目名称
        private String orderCategoryName;
        // 购买的商品数量
        private Integer count;
        // 订单总价
        private Integer price;
        // 单位
        private String unit;
        //商品总价
        private Integer totalPrice;
        //优惠金额
        private Integer discountPrice;
        //实付金额
        private Integer payPrice;
        //累计退款金额
        private Integer refundPrice;
        //累计退款数量
        private Integer refundCount;
        //到手价
        private Integer handedPrice;
        //成本价
        private Integer expensePrice;
        //服务保障列表
        private String properties;
        //服务内容
        private String serveContent;
    }
}
