feat: 人证人脸对比

This commit is contained in:
2026-06-23 15:21:47 +08:00
parent e720cefaf7
commit 3514610857
10 changed files with 732 additions and 0 deletions

View File

@@ -0,0 +1,79 @@
using Dlhis.Entity.Basic.Enums;
using Kurisu.AspNetCore.DataAccess.SqlSugar;
using SqlSugar;
using SqlSugar.DbConvert;
namespace Dlhis.Entity.Basic.Entity;
/// <summary>
/// 人证人脸对比记录
/// </summary>
[SugarTable(TableName = "IdCardFaceCompareRecord", TableDescription = "人证人脸对比记录表")]
public class IdCardFaceCompareRecordEntity : SugarBaseEntity
{
/// <summary>
/// 用户code
/// </summary>
[SugarColumn(IsNullable = false, ColumnDescription = "用户code", UniqueGroupNameList = new[] { "idx_IdCardFaceCompareRecord_UserCode" })]
public string UserCode { get; set; }
/// <summary>
/// 人员类型
/// </summary>
[SugarColumn(IsNullable = false, ColumnDescription = "人员类型", ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
public GainfoUserTypeEnumType UserType { get; set; }
/// <summary>
/// 姓名
/// </summary>
[SugarColumn(IsNullable = true, ColumnDescription = "姓名")]
public string UserName { get; set; }
/// <summary>
/// 证件号
/// </summary>
[SugarColumn(IsNullable = true, ColumnDescription = "证件号", UniqueGroupNameList = new[] { "idx_IdCardFaceCompareRecord_IdNo" })]
public string IdNo { get; set; }
/// <summary>
/// 对比结果
/// </summary>
[SugarColumn(IsNullable = false, ColumnDescription = "对比结果", ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
public IdCardFaceCompareResultEnumType CompareResult { get; set; }
/// <summary>
/// api响应结果
/// </summary>
[SugarColumn(IsNullable = true, ColumnDescription = "api响应结果", ColumnDataType = "longtext")]
public string ApiResponse { get; set; }
/// <summary>
/// 是否通过
/// </summary>
[SugarColumn(IsNullable = true, ColumnDescription = "是否通过", ColumnDataType = "bit")]
public bool? IsPassed { get; set; }
/// <summary>
/// 相似度
/// </summary>
[SugarColumn(IsNullable = true, ColumnDescription = "相似度")]
public double? Similarity { get; set; }
/// <summary>
/// 对比次数
/// </summary>
[SugarColumn(IsNullable = false, ColumnDescription = "对比次数")]
public int CompareCount { get; set; }
/// <summary>
/// 最近对比时间
/// </summary>
[SugarColumn(IsNullable = true, ColumnDescription = "最近对比时间")]
public DateTime? LastCompareTime { get; set; }
/// <summary>
/// 错误消息
/// </summary>
[SugarColumn(IsNullable = true, ColumnDescription = "错误消息", ColumnDataType = "text")]
public string ErrorMessage { get; set; }
}

View File

@@ -0,0 +1,22 @@
using System.ComponentModel;
namespace Dlhis.Entity.Basic.Enums;
/// <summary>
/// 人证人脸对比结果
/// </summary>
[Description("人证人脸对比结果")]
public enum IdCardFaceCompareResultEnumType
{
/// <summary>
/// 未对比
/// </summary>
[Description("未对比")]
NotCompared = 0,
/// <summary>
/// 已对比
/// </summary>
[Description("已对比")]
Compared = 1
}