package com.yc.ship.module.trade.controller.admin.order.vo.refund;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yc.ship.framework.excel.core.annotations.DictFormat;
import com.yc.ship.framework.excel.core.convert.DictConvert;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

import static com.yc.ship.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
import static com.yc.ship.framework.common.util.date.DateUtils.TIME_ZONE_DEFAULT;


@Schema(description = "管理后台 - 退款记录 Response VO")
@Data
@ExcelIgnoreUnannotated
public class RefundRecordRespVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "20256")
    private Long id;

    @Schema(description = "退票批次ID", example = "14296")
    @ExcelProperty("退票批次ID")
    private Long refundId;

    @Schema(description = "订单id")
    private Long orderId;

    @Schema(description = "订单号")
    @ExcelProperty("订单号")
    private String orderNo;

    @Schema(description = "支付平台退款单号")
    @ExcelProperty("支付平台退款单号")
    private String refundNo;

    @Schema(description = "支付平台支付订单号")
    @ExcelProperty("支付平台支付订单号")
    private String paymentNo;

    @Schema(description = "支付ID", example = "29029")
    private Long orderPayId;

    @Schema(description = "退款渠道", example = "29029")
    private Integer paymentType;

    @Schema(description = "退款金额")
    @ExcelProperty("退款金额")
    private BigDecimal refundAmount;

    @Schema(description = "退款状态", example = "2")
    @ExcelProperty(value ="退款状态",converter = DictConvert.class)
    @DictFormat("refund_audit_status")
    private Integer refundStatus;

    @Schema(description = "商户号")
    @ExcelProperty("商户号")
    private String merchantNo;

    @Schema(description = "微信或支付宝平台的用户openId", example = "28880")
    private String openId;

    @Schema(description = "创建时间")
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "退款时间")
    @ExcelProperty("退款时间")
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY, timezone = TIME_ZONE_DEFAULT)
    private LocalDateTime refundTime;

    @Schema(description = "预约游玩日期")
    @ExcelProperty("预约游玩日期")
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY, timezone = TIME_ZONE_DEFAULT)
    private LocalDateTime travelDate;

}