Skip to content
Jacky edited this page Feb 27, 2016 · 2 revisions

Description

This is the User schema defined in Mobile app. Base on Meteor Account

Collection Name

users

Use Meteor.users to access

Schema

    createdAt: KG.schema.createTime(),
    updatedAt: KG.schema.updateTime(),
    username: {
        type: String,
        unique : false,
        optional: true
    },
    emails: {
        type: [Object],
        optional: true
    },
    "emails.$.address": {
        type: String,
        regEx: SimpleSchema.RegEx.Email,
        optional: true
    },
    "emails.$.verified": {
        type: Boolean,
        optional: true
    },
    role : KG.schema.default({
        //defaultValue : 'admin',
        allowedValues : ['admin', 'user']
    }),
    schoolID : KG.schema.default({
        optional : true
    }),
    profile: {
        type: Object,
        optional: true,
        blackbox: true
    },
    services: {
        type: Object,
        optional: true,
        blackbox: true
    },
    status : KG.schema.default({
        allowedValues : ['active', 'disable'],
        defaultValue : 'active'
    })