ChatUserDto.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. string firstName, string lastName)
  33. {
  34. UserId = userId;
  35. UserName = userName;
  36. FirstName = firstName;
  37. LastName = lastName;
  38. ConnectionId = ConnId;
  39. Email = email;
  40. IsOnline = isOnline;
  41. ProfileImage = profileImg;
  42. UnseenCount = unseenCount;
  43. LastMessageDate = lastMessageDate;
  44. LastMessage = lastMessage;
  45. }
  46. }
  47. }