first commit

This commit is contained in:
Dhananjaya99
2026-09-28 11:44:26 +05:30
parent 721743ae6b
commit bffc9b1686
424 changed files with 46474 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Fitness_core_BE.Models
{
public class DeviceCommand
{
[Key]
public Guid Id { get; set; }
public Guid FKClientId { get; set; }
[ForeignKey("FKClientId")]
public Client Client { get; set; }
public Guid? FKDeviceId { get; set; }
[ForeignKey("FKDeviceId")]
public AccessDevice? AccessDevice { get; set; }
public Guid? FKAccessDeviceBindingId { get; set; }
[ForeignKey(nameof(FKAccessDeviceBindingId))]
public AccessDeviceBinding? AccessDeviceBinding { get; set; }
// e.g. "AddUser", "WhiteListMember", "BlackListMember"
public string CommandType { get; set; }
public string PayloadJson { get; set; }
// "Pending" / "InProgress" / "Completed" / "Failed"
public string Status { get; set; } = "Pending";
public string? ResultJson { get; set; }
public int DesiredVersion { get; set; }
public int AttemptCount { get; set; }
public int MaxAttempts { get; set; } = 5;
public DateTime? LeaseExpiresAt { get; set; }
public DateTime? NextAttemptAt { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime? ProcessedAt { get; set; }
}
}