LNRoomResponse.swift 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. //
  2. // LNRoomResponse.swift
  3. // Gami
  4. //
  5. // Created by OneeChan on 2026/3/11.
  6. //
  7. import Foundation
  8. import AutoCodable
  9. enum LNRoomApplySeatType: Int, Decodable {
  10. case all = 0
  11. case guest = 1
  12. case playmate = 2
  13. }
  14. struct LNRoomType: OptionSet, Decodable {
  15. let rawValue: Int
  16. static let unknown = LNRoomType([])
  17. static let playmate = LNRoomType(rawValue: 1<<0)
  18. static var availableType: [LNRoomType] {
  19. [.playmate]
  20. }
  21. }
  22. @AutoCodable
  23. class LNRoomAbilityVO: Decodable {
  24. var homeowner: Bool = false
  25. var roomTitle: String = ""
  26. var roomCover: String = ""
  27. var forbidAudio: Bool = false
  28. var roomTypes: [LNRoomType] = []
  29. }
  30. @AutoCodable
  31. class LNRoomCreateResponse: Decodable {
  32. var roomId: String = ""
  33. }
  34. @AutoCodable
  35. class LNRoomUserVO: Decodable {
  36. var id: String = ""
  37. var userNo: String = ""
  38. var avatar: String = ""
  39. var nickname: String = ""
  40. var birthday: Int = 0
  41. var age: Int = 0
  42. var gender: LNUserGender = .unknow
  43. var intro: String = ""
  44. var playmate: Bool = false
  45. var interests: [LNUserInterestVO] = []
  46. var photos: [String] = []
  47. init() { }
  48. }
  49. @AutoCodable
  50. class LNRoomMicApplyPageVO: Decodable {
  51. var applyId: String = ""
  52. var applyTime: Int64 = 0
  53. var user: LNRoomUserVO = LNRoomUserVO()
  54. var hasAccept = false
  55. }
  56. @AutoCodable
  57. class LNRoomMicApplyListResponse: Decodable {
  58. var list: [LNRoomMicApplyPageVO] = []
  59. var total: Int? = nil
  60. var next: String = ""
  61. }
  62. @AutoCodable
  63. class LNRoomGameCategoryResponse: Decodable {
  64. var list: [LNGameCategoryItemVO] = []
  65. }
  66. @AutoCodable
  67. class LNRoomUserListItemVO: Decodable {
  68. var user: LNRoomUserVO = LNRoomUserVO()
  69. var hasInvited = false
  70. }
  71. @AutoCodable
  72. class LNRoomUserListResponse: Decodable {
  73. var list: [LNRoomUserListItemVO] = []
  74. var total: Int? = nil
  75. var next: String = ""
  76. }
  77. @AutoCodable
  78. class LNRoomEntranceResponse: Decodable {
  79. var result: Bool = false
  80. }
  81. @AutoCodable
  82. class LNRandomRoomResponse: Decodable {
  83. var room: LNRoomItemVO? = nil
  84. }
  85. @AutoCodable
  86. class LNUserCurRoomResponse: Decodable {
  87. var room: LNRoomItemVO? = nil
  88. }