39 lines
1.4 KiB
C#
39 lines
1.4 KiB
C#
namespace HikvisionAttendanceService;
|
|
|
|
/// <summary>Outcome of syncing one employee to one target device in a cycle.</summary>
|
|
internal enum UserSyncStatus
|
|
{
|
|
AlreadySynced,
|
|
CreatedAndFaceUploaded,
|
|
CreatedNoFaceAvailable,
|
|
CreatedFaceUploadFailed,
|
|
ExistsFaceUploaded,
|
|
ExistsNoFaceOnSourceSkipped,
|
|
ExistsUserFieldsUpdated,
|
|
FailedCreate,
|
|
FailedFaceUpload,
|
|
FailedUserModify,
|
|
FailedDeleteOnTarget,
|
|
SkippedFaceUploadPolicy,
|
|
DeletedOnTargetNotInSource
|
|
}
|
|
|
|
/// <summary>Normalized user row from ISAPI UserInfo/Search for sync decisions.</summary>
|
|
internal sealed class UserDto
|
|
{
|
|
public string EmployeeNo { get; set; } = "";
|
|
public string Name { get; set; } = "";
|
|
public string UserType { get; set; } = "normal";
|
|
public int NumOfFace { get; set; }
|
|
public int NumOfFp { get; set; }
|
|
public string Gender { get; set; } = "";
|
|
public string FaceUrl { get; set; } = "";
|
|
public bool ValidEnable { get; set; } = true;
|
|
public string ValidBeginTime { get; set; } = "2026-01-01T00:00:00";
|
|
public string ValidEndTime { get; set; } = "2036-12-31T23:59:59";
|
|
public string DoorRight { get; set; } = "1";
|
|
/// <summary>Door access plan; default single-door template 1 when source omits it.</summary>
|
|
public int RightPlanDoorNo { get; set; } = 1;
|
|
public string RightPlanTemplateNo { get; set; } = "1";
|
|
}
|