package com.zsElectric.boot.business.model.form;

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import jakarta.validation.constraints.*;

/**
 * 退款订单表单对象
 *
 * @author zsElectric
 * @since 2025-12-17 16:48
 */
@Getter
@Setter
@Schema(description = "退款订单表单对象")
public class UserRefundsOrderInfoForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID")
    @NotBlank(message = "主键ID不能为空")
    @Size(max=64, message="主键ID长度不能超过64个字符")
    private String id;

    @Schema(description = "订单ID")
    @Size(max=64, message="订单ID长度不能超过64个字符")
    private String orderId;

    @Schema(description = "商户订单号")
    @Size(max=64, message="商户订单号长度不能超过64个字符")
    private String orderNo;

    @Schema(description = "退款类型：1-主动退款 2-用户申请退款")
    private Integer type;

    @Schema(description = "商户退款单号")
    @Size(max=64, message="商户退款单号长度不能超过64个字符")
    private String outRefundNo;

    @Schema(description = "微信支付退款单号")
    @Size(max=64, message="微信支付退款单号长度不能超过64个字符")
    private String refundId;

    @Schema(description = "微信支付订单号")
    @Size(max=64, message="微信支付订单号长度不能超过64个字符")
    private String transactionId;

    @Schema(description = "退款原因")
    @Size(max=255, message="退款原因长度不能超过255个字符")
    private String reason;

    @Schema(description = "退款受理时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime acceptedTime;

    @Schema(description = "退款成功时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime successTime;

    @Schema(description = "退款金额（元）")
    private BigDecimal amount;

    @Schema(description = "微信退款回调参数")
    @Size(max=65535, message="微信退款回调参数长度不能超过65535个字符")
    private String notifyRequest;

    @Schema(description = "退款状态")
    @Size(max=255, message="退款状态长度不能超过255个字符")
    private String status;

    @Schema(description = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "修改时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @Schema(description = "逻辑删除(0-未删除 1-已删除)")
    private Integer isDeleted;


}
