Skip to content

Instantly share code, notes, and snippets.

@maltebucksch
Created June 26, 2018 08:00
Show Gist options
  • Save maltebucksch/28046419ae12203447ef4cd85b1c91d1 to your computer and use it in GitHub Desktop.
Save maltebucksch/28046419ae12203447ef4cd85b1c91d1 to your computer and use it in GitHub Desktop.
Realm Sync Service: User-Full
class User: Object, Uploadable {
@objc dynamic var id: Int = 0
@objc dynamic var username: String = ""
@objc dynamic var updatedDate: Date = Date()
override static func primaryKey() -> String? {
return "id"
}
var resourceURL: URL {
return URL(string: "\(API)/users")!
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment