package com.jeesharp.business.modules.pay.paysubmerchantapplyment.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.jeesharp.framework.mybatis.core.dataobject.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 特约商户注销/注销提现申请记录，映射表 {@code biz_pay_sub_merchant_cancel}。
 *
 * @author jeesharp
 * @since 2026-06-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("biz_pay_sub_merchant_cancel")
@Schema(description = "特约商户注销申请")
public class PaySubMerchantCancel extends BaseEntity<PaySubMerchantCancel> {

    @Schema(description = "关联进件主表 ID")
    private String applymentId;

    @Schema(description = "特约商户号")
    private String subMchId;

    @Schema(description = "商户注销申请单号")
    private String outRequestNo;

    @Schema(description = "微信支付注销提现申请单号")
    private String wxApplymentId;

    @Schema(description = "是否提取资金：NOT_APPLY_WITHDRAW/APPLY_WITHDRAW")
    private String withdraw;

    @Schema(description = "注销提现申请单状态")
    private String cancelState;

    @Schema(description = "状态说明/驳回原因")
    private String cancelStateDesc;

    @Schema(description = "提现状态")
    private String withdrawState;

    @Schema(description = "商户确认注销页面 URL")
    private String confirmCancelUrl;

    @Schema(description = "注销协议版本号")
    private String cancelContractVersion;

    @Schema(description = "资格校验响应 JSON")
    private String validateJson;

    @Schema(description = "提交微信请求体")
    private String submitJson;

    @Schema(description = "最近一次查单响应")
    private String queryJson;

    @Schema(description = "提交微信时间")
    private LocalDateTime submitDate;

    @Schema(description = "最近同步状态时间")
    private LocalDateTime lastSyncDate;

    @Schema(description = "进件所属租户ID（业务字段）")
    private String applymentTenantId;
}
