мангуст поле с именем типа

Я пытаюсь проверить и сохранить профиль Passport с такой структурой:

http://passportjs.org/guide/profile/

Вот схема, которую я придумал:

// Define the schema.
schema = new mongoose.Schema({
    // The name of this user, suitable for display.
    displayName: String,
    // Each e-mail address ...
    emails: [{
        // ... with the actual email address ...
        value: String,
        // ... and the type of email address (home, work, etc.).
        type: String
    }],
    // A unique identifier for the user, as generated by the service provider.
    id: String,
    // The name ...
    name: {
        // ... with the family name of this user, or "last name" in most Western languages ...
        familyName: String,
        // ... with the given name of this user, or "first name" in most Western languages ...
        givenName: String,
        // ... and with the middle name of this user.
        middleName: String
    },
    // The provider which with the user authenticated.
    provider: String
});

У электронной почты есть свойство, которое называетсятип', который зарезервирован для мангустного типа. Как мне это решить?

Ответы на вопрос(1)

Ваш ответ на вопрос