namespace SafeCampus.Application.Services.Business.AttendanceService;
public class AttendanceList
{
///
/// ID
///
public long Id { get; set; }
///
/// 租户id
///
public string TenantCode { get; set; }
///
/// 门店id
///
public string PoiId { get; set; }
///
/// 考勤事件id
///
public string EventId { get; set; }
///
/// 人员跟踪id
///
public string TrackId { get; set; }
///
/// 关联底库id 如果为空,表示该人员未匹配到底库
///
public string PersonSetId { get; set; }
///
/// 人员id
///
public string PersonId { get; set; }
///
/// 人员名称
///
public string PersonName { get; set; }
///
/// 寝室名称
///
public string DormitName { get; set; }
//人员性别
public string Gender { get; set; }
///
/// 班级名称
///
public string PersonSetName { get; set; }
///
/// 是否自动上报
///
public bool IsAuto { get; set; }
///
/// 相似度
///
public float Similarity { get; set; }
///
/// 摄像头id
///
public string CameraId { get; set; }
///
/// 人脸质量分,取值[0, 100]
///
public float FaceScore { get; set; }
///
/// 人脸照片url,链接有效期为2小时
///
public string SnapshotUrl { get; set; }
///
/// 人脸照片数据,base64编码(本地对接使用)
///
public string SnapshotData { get; set; }
///
/// 事件发生时间
///
public DateTime Tick { get; set; }
///
/// 目标在快照中的位置
///
public string Rects { get; set; }
///
/// 人员扩展信息
///
public string Extend { get; set; }
///
/// 创建时间
///
public DateTime CreateTime { get; set; }
}
public class AttendanceListMapper : IRegister
{
public void Register(TypeAdapterConfig config)
{
config.ForType()
.Map(x => x.PersonName, x => !string.IsNullOrEmpty(x.PersonId) ? x.PersonInfoItem.Name : "")
.Map(x => x.PersonSetName, x => !string.IsNullOrEmpty(x.PersonId) ? x.PersonInfoItem.PersonSetInfoItem.PersonSetName : "")
.Map(x => x.DormitName, x => !string.IsNullOrEmpty(x.PersonId) ? x.PersonInfoItem.DormitoryInfoItem.Name : "")
.Map(x => x.Gender, x => !string.IsNullOrEmpty(x.PersonId) ? x.PersonInfoItem.Gender : "");
}
}