Initial commit - ERP
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
using Chat.Domain.Enums;
|
||||
using System;
|
||||
|
||||
namespace Chat.Domain.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a user's presence status and connection information for real-time features.
|
||||
/// </summary>
|
||||
public class UserPresence
|
||||
{
|
||||
/// <summary>
|
||||
/// Primary key - the unique identifier of the user.
|
||||
/// </summary>
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The current status of the user (Online, Offline, Away).
|
||||
/// </summary>
|
||||
public UserStatus Status { get; set; } = UserStatus.Offline;
|
||||
|
||||
/// <summary>
|
||||
/// Date and time when the user was last seen.
|
||||
/// </summary>
|
||||
public DateTime LastSeenAt { get; set; } = DateTime.UtcNow;
|
||||
|
||||
/// <summary>
|
||||
/// SignalR connection ID for real-time messaging. Can be null if the user is not connected.
|
||||
/// </summary>
|
||||
public string? ConnectionId { get; set; }
|
||||
|
||||
// Navigation property (to User entity when it exists)
|
||||
// public User User { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user