ChatUserDto.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace MTWorkHR.Application.Models
  7. {
  8. public class ChatUserDto
  9. {
  10. public string UserId { get; set; }
  11. public string UserName { get; set; }
  12. public string ConnectionId { get; set; } //signalrId
  13. public string FirstName { get; set; }
  14. public string LastName { get; set; }
  15. public string FavoriteName { get; set; }
  16. public string PhoneNumber { get; set; }
  17. public string Email { get; set; }
  18. public bool IsOnline { get; set; }
  19. public string? ProfileImage { get; set; }
  20. public string? LastMessage { get; set; }
  21. public DateTime? LastMessageDate { get; set; }
  22. public int? UnseenCount { get; set; }
  23. public ChatUserDto(string someId, string someName, string someConnId)
  24. {
  25. UserId = someId;
  26. UserName = someName;
  27. ConnectionId = someConnId;
  28. }
  29. public ChatUserDto(string userId, string userName, string ConnId, string email, bool isOnline, string profileImg, int? unseenCount,string lastMessage, DateTime? lastMessageDate)
  30. {
  31. UserId = userId;
  32. UserName = userName;
  33. ConnectionId = ConnId;
  34. Email = email;
  35. IsOnline = isOnline;
  36. ProfileImage = profileImg;
  37. UnseenCount = unseenCount;
  38. LastMessageDate = lastMessageDate;
  39. LastMessage = lastMessage;
  40. }
  41. }
  42. }