Updating models

This commit is contained in:
Raymond Feng 2013-07-08 16:59:11 -07:00
parent 9fe79dbfca
commit b4391e6b26
5 changed files with 66 additions and 15 deletions

View File

@ -40,4 +40,6 @@ var ACLSchema = {
status: String, // Enabled/disabled
created: Date,
lastUpdated: Date
}
}
// readAccess, writeAccess --> public, userId, role

View File

@ -1,17 +1,26 @@
// Application model
/**
* Data model for Application
*/
var ApplicationSchema = {
// Basic information
id: {type: String, required: true},
name: {type: String, required: true},
description: String, // description
icon: String, // The icon url
public: Boolean,
icon: String, // The icon image url
public: Boolean, // Do we list the application in the public catalog?
permissions: [String],
userId: String,
owner: String, // The user id of the developer who registers the application
collaborators: [String], // A list of users ids who have permissions to work on this app
status: String,
// EMail
email: String, // e-mail address
emailVerified: Boolean, // Is the e-mail verified
status: String, // Status of the application, enabled/disabled
// Keys
clientKey: String,
@ -24,18 +33,24 @@ var ApplicationSchema = {
pushPlatforms: [String],
pushCredentials: [],
// Authentication
// User Authentication
authenticationEnabled: Boolean,
anonymousAllowed: Boolean,
schemes: [String], // Basic, facebook, github, google
attachedCredentials: [],
// email
email: String, // e-mail address
emailVerified: Boolean, // Is the e-mail verified
collaborators: [String], // A list of users ids who have permissions to work on this app
created: Date,
lastUpdated: Date
};
/**
* Application management functions
*/
// Register a new application

View File

@ -1,4 +1,17 @@
// See Device registration
var InstallationSchema = {
id: {
type: String,
required: true,
id: 1
},
appId: String,
appVersion: String,
userId: String,
deviceToken: String,
deviceType: String,
subscriptions: [String],
created: Date,
lastModified: Date,
status: String
};

View File

@ -1,10 +1,10 @@
// Role model
var RoleSchema = {
id: {type: String, required: true},
name: {type: String, required: true},
name: {type: String, required: true}, // The name of a role
description: String,
roles: [String], // A role can be an aggregate of other roles
users: [String], // A role contains a list of users
created: Date,
lastUpdated: Date
}

View File

@ -1,3 +1,24 @@
/**
* User Model
Active User
Explicit vs. Implicit
Signup
Removing the User from the System
Login
Logout
User Management
Email Verification
Password Reset
Forgot Username
Using Social Identities
Facebook
Google+
LinkedIn
Twitter
User Discovery
Username Existence Check
* @type {{question: *, answer: *}}
*/
var ChallengeSchema = {
// id: String,
question: String,