package com.qnfhq.modules.authentication.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 认证请求响应记录表
 * </p>
 *
 * @author huang
 * @since 2025-07-18
 */
@Getter
@Setter
@TableName("t_user_authentication")
@Tag(name = "TUserAuthentication对象", description = "认证请求响应记录表")
public class UserAuthentication implements Serializable {

    private static final long serialVersionUID = 1L;


    @Schema(title = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(title ="HTTP状态码")
    @TableField("http_status_code")
    private Integer httpStatusCode;

    @Schema(title ="请求ID")
    @TableField("request_id")
    private String requestId;

    @Schema(title ="返回Code")
    @TableField("code")
    private String code;

    @Schema(title ="请求消息的响应信息")
    @TableField("message")
    private String message;

    @Schema(title ="认证最终结果：Y（通过）、N（不通过）")
    @TableField("result_passed")
    private String resultPassed;

    @Schema(title ="认证结果描述（SubCode）")
    @TableField("result_sub_code")
    private String resultSubCode;

    @Schema(title ="活体人脸验证相关结果信息（JSON格式）")
    @TableField("ext_face_info")
    private String extFaceInfo;

    @Schema(title ="证件识别相关结果信息（JSON格式）")
    @TableField("ext_id_info")
    private String extIdInfo;

    @Schema(title ="记录创建时间")
    @TableField("created_time")
    private LocalDateTime createdTime;

    @Schema(title ="用户id")
    @TableField("user_id")
    private Long userId;

    @Schema(title ="整个认证流程的唯一标识")
    @TableField("transaction_id")
    private String transactionId;
}
