first commit
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
namespace Fitness_core_BE.DTOs.Agent
|
||||
{
|
||||
// POST /api/agent/enroll (bootstrap, no api-key auth)
|
||||
public class EnrollRequest
|
||||
{
|
||||
public string Code { get; set; }
|
||||
public string AgentName { get; set; }
|
||||
}
|
||||
|
||||
// POST /api/agent/devices
|
||||
public class RegisterDeviceRequest
|
||||
{
|
||||
public string DeviceName { get; set; }
|
||||
public Guid? DeviceId { get; set; }
|
||||
public string? HardwareId { get; set; }
|
||||
}
|
||||
|
||||
// POST /api/agent/attendance
|
||||
public class AgentAttendanceRequest
|
||||
{
|
||||
public Guid DeviceId { get; set; }
|
||||
public List<AgentAttendanceEvent> Events { get; set; } = new();
|
||||
}
|
||||
|
||||
public class AgentAttendanceEvent
|
||||
{
|
||||
public string EmployeeNoString { get; set; }
|
||||
public DateTime Time { get; set; }
|
||||
public string AttendanceStatus { get; set; }
|
||||
}
|
||||
|
||||
// POST /api/agent/commands/{id}/result
|
||||
public class CommandResultRequest
|
||||
{
|
||||
public bool Success { get; set; }
|
||||
public string? ResultJson { get; set; }
|
||||
}
|
||||
|
||||
// Full person inventory contains metadata only. Fingerprint template bytes stay
|
||||
// on the terminal and are never uploaded to the cloud.
|
||||
public class DeviceInventoryRequest
|
||||
{
|
||||
public Guid DeviceId { get; set; }
|
||||
public List<DeviceInventoryPerson> People { get; set; } = new();
|
||||
}
|
||||
|
||||
public class DeviceInventoryPerson
|
||||
{
|
||||
public string EmployeeNo { get; set; } = string.Empty;
|
||||
public string? Name { get; set; }
|
||||
public string? UserType { get; set; }
|
||||
public int FingerprintCount { get; set; }
|
||||
}
|
||||
|
||||
// POST /api/agent/heartbeat. Device reachability is measured on the LAN by
|
||||
// the agent; the cloud never attempts to connect to a private terminal.
|
||||
public class AgentHeartbeatRequest
|
||||
{
|
||||
public List<AgentDeviceHealthReport> Devices { get; set; } = new();
|
||||
}
|
||||
|
||||
public class AgentDeviceHealthReport
|
||||
{
|
||||
public Guid DeviceId { get; set; }
|
||||
public bool IsOnline { get; set; }
|
||||
}
|
||||
|
||||
// POST /api/agent/time-bank-cards/redeem -- an RFID-reader-equipped agent station
|
||||
// reporting a card swipe (tap-in or tap-out, see TimeBankCardService.Swipe). FacilityId is
|
||||
// the reader's own fixed station, not something read off the card.
|
||||
public class AgentSwipeTimeBankCardRequest
|
||||
{
|
||||
public string RfidTagId { get; set; } = string.Empty;
|
||||
public Guid FacilityId { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user