CommunityPostCommentsModel.swift 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. //
  2. // CommunityPostCommentsModel.swift
  3. // Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
  4. import Foundation
  5. import ObjectMapper
  6. class CommunityPostCommentsModel : NSObject, Mappable{
  7. var data : [CommunityPostCommentModel]?
  8. var pagination : PaginationModel?
  9. var commentCount : Int?
  10. class func newInstance(map: Map) -> Mappable?{
  11. return CommunityPostCommentsModel()
  12. }
  13. required init?(map: Map){}
  14. private override init(){}
  15. func mapping(map: Map)
  16. {
  17. data <- map["data"]
  18. pagination <- map["pagination"]
  19. commentCount <- map["comment_count"]
  20. }
  21. }
  22. class CommunityPostCommentModel : NSObject, Mappable{
  23. var avatar : String?
  24. var content : String?
  25. var createdAt : String?
  26. var id : Int?
  27. var reply : [CommunityPostReplyModel]?
  28. var replyCount : Int?
  29. var uid : Int?
  30. var username : String?
  31. var height : CGFloat?
  32. var isDelete : Int?
  33. class func newInstance(map: Map) -> Mappable?{
  34. return CommunityPostCommentModel()
  35. }
  36. required init?(map: Map){}
  37. override init(){}
  38. func mapping(map: Map)
  39. {
  40. avatar <- map["avatar"]
  41. content <- map["content"]
  42. createdAt <- map["created_at"]
  43. id <- map["id"]
  44. reply <- map["reply"]
  45. replyCount <- map["reply_count"]
  46. uid <- map["uid"]
  47. username <- map["username"]
  48. isDelete <- map["is_delete"]
  49. }
  50. }
  51. class CommunityPostReplyModel : NSObject, Mappable{
  52. var avatar : String?
  53. var content : String?
  54. var createdAt : String?
  55. var replyUsername : String?
  56. var uid : Int?
  57. var username : String?
  58. var id : Int?
  59. var height : CGFloat?
  60. var isDelete : Int?
  61. class func newInstance(map: Map) -> Mappable?{
  62. return CommunityPostReplyModel()
  63. }
  64. required init?(map: Map){}
  65. override init(){}
  66. func mapping(map: Map)
  67. {
  68. id <- map["id"]
  69. avatar <- map["avatar"]
  70. content <- map["content"]
  71. createdAt <- map["created_at"]
  72. replyUsername <- map["reply_username"]
  73. uid <- map["uid"]
  74. username <- map["username"]
  75. isDelete <- map["is_delete"]
  76. }
  77. }