ChatUserDto.cs 1.6 KB

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