             },
             UpdateableKey(Note.bodyKey, String.self) { note, body in
                 note.body = body
+            },
+            UpdateableKey(Note.isPinnedKey, Bool.self) { note, isPinned in
+                note.isPinned = isPinned
             }
         ]
     }

        try self.init(
            title: json.get(Note.titleKey),
            body: json.get(Note.bodyKey),
            userId: json.get(User.foreignIdKey)
        )
    }
    

        try json.set(Note.idKey, id)
        try json.set(Note.titleKey, title)
        try json.set(Note.bodyKey, body)
        try json.set(Note.isPinnedKey, isPinned)
        return json
    }
}
