package com.neusoft.smart.pos.dto.order.response;

import com.neusoft.smart.pos.framework.utils.DateUtils;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author tongmg
 * @date 2020-02-11 10：43
 * @description 获得退款订单使用Response
 */
@ApiModel
@Data
@NoArgsConstructor
public class GetRefundOrderInfoResponse {

    private List<GetRefundOrderInfoResponse.OrderRefundDetail> orderRefundDetailList;
    private List<GetRefundOrderInfoResponse.RefundPayOrderInfo> refundPayOrderInfos;

    @Data
    @ApiModel
    public static class OrderRefundDetail{
        private Integer id;
        private String orderNumber;
        private String itemNumber;
        private String itemName;
        private String categoryName;
        private String categoryNumber;
        private BigDecimal unitPrice;
        private BigDecimal discountAmount;
        private Integer quantity;
        private BigDecimal finalPrice;
    }

    @Data
    @ApiModel
    public static class RefundPayOrderInfo{
        private Integer id;
        private String tradeId;
        private String payType;
        private String payTypeName;
        private Long payAmount;
        private String payStatus;
        private String payStatusName;
        private String payTime;
        public void setPayTime(Date payTime) {this.payTime = DateUtils.format(payTime,DateUtils.FORMAT_LONG);}
    }

}
