package com.cyksj.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * 退还失败记录表
 */
@Getter
@Setter
@TableName("nano_refund_failure_record")
public class NanoRefundFailureRecord extends BaseEntity {

    /**
     * 任务ID
     */
    private String taskId;

    /**
     * 用户token
     */
    private String userToken;

    /**
     * 需要退还的次数
     */
    private Integer refundCount;

    /**
     * 退还类型(full_failure/partial_failure/timeout)
     */
    private String refundType;

    /**
     * 失败原因
     */
    private String failureReason;

    /**
     * 重试次数
     */
    private Integer retryCount;

    /**
     * 最大重试次数
     */
    private Integer maxRetryCount;

    /**
     * 状态(pending/processing/success/failed)
     */
    private String status;

    /**
     * 最后重试时间
     */
    private Date lastRetryTime;

    /**
     * 下次重试时间
     */
    private Date nextRetryTime;

    /**
     * 正在处理的实例ID
     */
    private String processingInstance;

    /**
     * 软删除时间
     */
    @TableLogic
    private Date deletedAt;
}