package com.jeesharp.business.modules.finance.paymentrecord.dto;

import com.jeesharp.framework.pojo.dto.BaseSaveDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

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

/**
 * 支付记录后台保存 DTO，供补录或对账修正；网关落库建议走专用应用接口后续扩展。
 *
 * @author jeesharp
 * @since 2026-05-09
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "支付记录保存")
public class PayRecordSaveDTO extends BaseSaveDTO {

    @Schema(description = "支付完成时间")
    private LocalDateTime payTime;

    @Schema(description = "金额（元）")
    private BigDecimal payAmount;

    @Schema(description = "用户ID")
    private String memberId;

    @Schema(description = "用户姓名")
    private String memberName;

    @Schema(description = "手机号")
    private String mobile;

    @Schema(description = "登录账号")
    private String loginAccount;

    @Schema(description = "支付状态：0-待支付 1-成功 2-失败 3-已关闭")
    private Integer payStatus;

    @Schema(description = "支付类型编码")
    private String payType;

    @Schema(description = "回调内容")
    private String callbackBody;

    @Schema(description = "商户订单号")
    private String merchantOrderNo;

    @Schema(description = "支付订单号（第三方）")
    private String payOrderNo;

    @Schema(description = "业务区分：0-支付 2-退款")
    private Integer bizKind;

    @Schema(description = "业务类型")
    private String bizType;

    @Schema(description = "业务主键")
    private String bizId;

    @Schema(description = "业务场景编码")
    private String bizScene;

    @Schema(description = "标题/商品描述")
    private String subject;

    @Schema(description = "支付渠道")
    private String payChannel;

    @Schema(description = "币种")
    private String currency;

    @Schema(description = "回调时间")
    private LocalDateTime callbackTime;

    @Schema(description = "关联原支付流水号（退款）")
    private String relatedPayOrderNo;

    @Schema(description = "错误码")
    private String errorCode;

    @Schema(description = "错误说明")
    private String errorMsg;

    @Schema(description = "客户端 IP")
    private String clientIp;
}
