Skip to content

Instantly share code, notes, and snippets.

@mlconnor
Created October 15, 2013 20:42
Show Gist options
  • Save mlconnor/6998351 to your computer and use it in GitHub Desktop.
Save mlconnor/6998351 to your computer and use it in GitHub Desktop.
Start of a Mongoose Schema for Open Social and Portable Contacts User
var UserSchema = new Schema({
'emails' : {
'value' : 'String',
'type' : 'String' /* home, work, etc */
},
'photos' : {[
'value' : 'String'
]},
'name' : {
'honorificPrefix' : 'String',
'familyName' : 'String',
'givenName' : 'String',
'middleName' : 'String',
'honorificSuffix' : 'String',
'additionalName' : 'String'
},
'address' : [{
'streetAddress' : 'String',
'extendedAddress' : 'String',
'locality' : 'String',
'region' : 'String',
'postalCode' : 'String',
'country' : 'String',
'latitude' : 'String',
'longitude' : 'String',
'poBox' : 'String'
}],
'birthday' : 'String',
'gender' : 'String', /* MALE|FEMALE */
'aboutMe' : 'String',
'bodyType' : 'String',
'currentLocation' : 'String',
'drinker' : 'String',
'ethnicity' : 'String',
'fashion' : 'String',
'happiestWhen' : 'String',
'humor' : 'String',
'livingArrangement' : 'String',
'lookingFor' : 'String', /* DATING|FRIENDS|RELATIONSHIP|NETWORKING|ACTIVITY_PARTNERS|RANDOM */
'profileSong' : 'String',
'profileVideo' : 'String',
'relationshipStatus' : 'String',
'religion' : 'String',
'romance' : 'String',
'scaredOf' : 'String',
'sexualOrientation' : 'String',
'smoker' : 'String', /* NO|YES|SOCIALLY|OCCASIONALLY|REGULARLY|HEAVILY|QUITTING|QUIT */
'status' : 'String', /* OFFLINE|ONLINE|AWAY|CHAT|DND|XA */
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment