Serializable model

refer to issue https://github.com/resthub/resthub-identity/issues/14