namespace HikvisionAttendanceService;
/// Outcome of syncing one employee to one target device in a cycle.
internal enum UserSyncStatus
{
AlreadySynced,
CreatedAndFaceUploaded,
CreatedNoFaceAvailable,
CreatedFaceUploadFailed,
ExistsFaceUploaded,
ExistsNoFaceOnSourceSkipped,
ExistsUserFieldsUpdated,
FailedCreate,
FailedFaceUpload,
FailedUserModify,
FailedDeleteOnTarget,
SkippedFaceUploadPolicy,
DeletedOnTargetNotInSource
}
/// Normalized user row from ISAPI UserInfo/Search for sync decisions.
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";
/// Door access plan; default single-door template 1 when source omits it.
public int RightPlanDoorNo { get; set; } = 1;
public string RightPlanTemplateNo { get; set; } = "1";
}