|
| 1 | +using System; |
| 2 | + |
| 3 | +namespace Resgrid.Model |
| 4 | +{ |
| 5 | + /// <summary> |
| 6 | + /// Represents the check-in timer status for a single user on a single active call |
| 7 | + /// that has personnel check-in timers enabled. |
| 8 | + /// </summary> |
| 9 | + public class UserCallCheckInSummary |
| 10 | + { |
| 11 | + /// <summary>The call identifier.</summary> |
| 12 | + public int CallId { get; set; } |
| 13 | + |
| 14 | + /// <summary>The call name / nature of call.</summary> |
| 15 | + public string CallName { get; set; } |
| 16 | + |
| 17 | + /// <summary>The human-readable call number (e.g. "2024-0042").</summary> |
| 18 | + public string CallNumber { get; set; } |
| 19 | + |
| 20 | + /// <summary>UTC timestamp when the call was logged.</summary> |
| 21 | + public DateTime CallStartedOn { get; set; } |
| 22 | + |
| 23 | + /// <summary>True when a personnel-type check-in timer is active for this call.</summary> |
| 24 | + public bool HasPersonnelTimer { get; set; } |
| 25 | + |
| 26 | + /// <summary> |
| 27 | + /// How long (in minutes) the user has before they must check in. |
| 28 | + /// Only meaningful when <see cref="HasPersonnelTimer"/> is true. |
| 29 | + /// </summary> |
| 30 | + public int DurationMinutes { get; set; } |
| 31 | + |
| 32 | + /// <summary> |
| 33 | + /// Number of minutes before the deadline at which a "Warning" status is issued. |
| 34 | + /// Only meaningful when <see cref="HasPersonnelTimer"/> is true. |
| 35 | + /// </summary> |
| 36 | + public int WarningThresholdMinutes { get; set; } |
| 37 | + |
| 38 | + /// <summary>UTC timestamp of the user's most-recent check-in on this call, or null if never checked in.</summary> |
| 39 | + public DateTime? LastCheckIn { get; set; } |
| 40 | + |
| 41 | + /// <summary>True when the user must check in immediately (timer has expired).</summary> |
| 42 | + public bool NeedsCheckIn { get; set; } |
| 43 | + |
| 44 | + /// <summary> |
| 45 | + /// Minutes remaining until the next check-in is required. |
| 46 | + /// Positive = time still available, negative = how many minutes overdue. |
| 47 | + /// Zero or negative implies <see cref="NeedsCheckIn"/> is true. |
| 48 | + /// </summary> |
| 49 | + public double MinutesRemaining { get; set; } |
| 50 | + |
| 51 | + /// <summary> |
| 52 | + /// Colour-coded status string: "Green", "Warning", "Critical", or "NoTimer" |
| 53 | + /// when no personnel timer is configured for the call. |
| 54 | + /// </summary> |
| 55 | + public string Status { get; set; } |
| 56 | + } |
| 57 | +} |
0 commit comments