ListFriendDTO.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <?php
  2. namespace App\Generated\V1_1\DTOs;
  3. use Kamicloud\StubApi\Concerns\ValueHelper;
  4. use App\Generated\V1_1\Enums\FriendLevel;
  5. use Kamicloud\StubApi\DTOs\DTO;
  6. use Kamicloud\StubApi\Utils\Constants;
  7. use App\Generated\V1_1\Enums\AllContactsListType;
  8. use App\Generated\V1_1\DTOs\ContactUserDTO;
  9. class ListFriendDTO extends DTO
  10. {
  11. use ValueHelper;
  12. protected $list_type;
  13. protected $friend_level;
  14. protected $last_at;
  15. protected $list_unread_msg_cnt;
  16. protected $last_msg;
  17. protected $star_at;
  18. protected $is_blacklist;
  19. protected $user;
  20. /**
  21. * 列表类型
  22. * @return mixed|null
  23. */
  24. public function getList_type()
  25. {
  26. return $this->list_type;
  27. }
  28. /**
  29. * 好友等级
  30. * @return mixed|null
  31. */
  32. public function getFriend_level()
  33. {
  34. return $this->friend_level;
  35. }
  36. /**
  37. * 最后交互时间
  38. * @return int
  39. */
  40. public function getLast_at()
  41. {
  42. return $this->last_at;
  43. }
  44. /**
  45. * 列表未读消息数量
  46. * @return int
  47. */
  48. public function getList_unread_msg_cnt()
  49. {
  50. return $this->list_unread_msg_cnt;
  51. }
  52. /**
  53. * 最近聊天消息
  54. * @return null|null
  55. */
  56. public function getLast_msg()
  57. {
  58. return $this->last_msg;
  59. }
  60. /**
  61. * 星标时间
  62. * @return int|null
  63. */
  64. public function getStar_at()
  65. {
  66. return $this->star_at;
  67. }
  68. /**
  69. * 是否拉黑
  70. * @return int|null
  71. */
  72. public function getIs_blacklist()
  73. {
  74. return $this->is_blacklist;
  75. }
  76. /**
  77. * 联系人信息
  78. * @return ContactUserDTO|null
  79. */
  80. public function getUser()
  81. {
  82. return $this->user;
  83. }
  84. public function setList_type($list_type)
  85. {
  86. $this->list_type = $list_type;
  87. }
  88. public function setFriend_level($friend_level)
  89. {
  90. $this->friend_level = $friend_level;
  91. }
  92. public function setLast_at($last_at)
  93. {
  94. $this->last_at = $last_at;
  95. }
  96. public function setList_unread_msg_cnt($list_unread_msg_cnt)
  97. {
  98. $this->list_unread_msg_cnt = $list_unread_msg_cnt;
  99. }
  100. public function setLast_msg($last_msg)
  101. {
  102. $this->last_msg = $last_msg;
  103. }
  104. public function setStar_at($star_at)
  105. {
  106. $this->star_at = $star_at;
  107. }
  108. public function setIs_blacklist($is_blacklist)
  109. {
  110. $this->is_blacklist = $is_blacklist;
  111. }
  112. public function setUser($user)
  113. {
  114. $this->user = $user;
  115. }
  116. public function getAttributeMap()
  117. {
  118. return [
  119. ['list_type', 'list_type', AllContactsListType::class, Constants::ENUM | Constants::OPTIONAL, null],
  120. ['friend_level', 'friend_level', FriendLevel::class, Constants::ENUM | Constants::OPTIONAL, null],
  121. ['last_at', 'last_at', 'bail|integer', Constants::INTEGER, null],
  122. ['list_unread_msg_cnt', 'list_unread_msg_cnt', 'bail|integer', Constants::INTEGER, null],
  123. ['last_msg', 'last_msg', 'bail|nullable', null | Constants::OPTIONAL, null],
  124. ['star_at', 'star_at', 'bail|nullable|integer', Constants::INTEGER | Constants::OPTIONAL, null],
  125. ['is_blacklist', 'is_blacklist', 'bail|nullable|integer', Constants::INTEGER | Constants::OPTIONAL, null],
  126. ['user', 'user', ContactUserDTO::class, Constants::MODEL | Constants::OPTIONAL, null],
  127. ];
  128. }
  129. }