Created
August 11, 2017 15:47
-
-
Save phucnm/117aa772c5078f1c2a61ef2b854ac5fa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Post: Mappable { | |
| var postId: String? | |
| var title: String? | |
| var content: String? | |
| var author: String? | |
| var likes: [String]? | |
| func mapping(map: Map) { | |
| postId <- map[Post.firebaseIdKey] | |
| title <- map["title"] | |
| content <- map["content"] | |
| author <- map["author"] | |
| likes <- (map["likes"], DictionaryKeyTransform()) | |
| } | |
| required init?(map: Map) { } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment