Add schema skeletons for built-in models
This commit is contained in:
parent
b00248cc18
commit
8ec0533eb4
|
@ -0,0 +1,17 @@
|
|||
// Schema ACL options
|
||||
|
||||
|
||||
// Object level permissions
|
||||
|
||||
// open: no protection
|
||||
// none: always rejected
|
||||
// owner: only the owner
|
||||
// loggedIn: any logged in user
|
||||
// roles: logged in users with the roles
|
||||
// related: owner of the related objects
|
||||
|
||||
// Class level permissions
|
||||
|
||||
// scopes
|
||||
|
||||
// URL level permissions
|
|
@ -0,0 +1,41 @@
|
|||
// Application model
|
||||
var ApplicationSchema = {
|
||||
|
||||
// Basic information
|
||||
id: {type: String, required: true},
|
||||
name: {type: String, required: true},
|
||||
description: String, // description
|
||||
icon: String, // The icon url
|
||||
public: Boolean,
|
||||
permissions: [String],
|
||||
|
||||
userId: String,
|
||||
|
||||
status: String,
|
||||
|
||||
// Keys
|
||||
clientKey: String,
|
||||
javaScriptKey: String,
|
||||
restApiKey: String,
|
||||
windowsKey: String,
|
||||
masterKey: String,
|
||||
|
||||
// Push notification
|
||||
pushPlatforms: [String],
|
||||
pushCredentials: [],
|
||||
|
||||
// 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
|
||||
};
|
|
@ -0,0 +1,4 @@
|
|||
// Device registration
|
||||
var InstallationSchema = {
|
||||
|
||||
};
|
|
@ -0,0 +1,11 @@
|
|||
// Role model
|
||||
var RoleSchema = {
|
||||
id: {type: String, required: true},
|
||||
name: {type: String, required: true},
|
||||
roles: [String],
|
||||
users: [String],
|
||||
acl: [],
|
||||
|
||||
created: Date,
|
||||
lastUpdated: Date
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
// User model
|
||||
var UserSchema = {
|
||||
id: {type: String, required: true},
|
||||
username: {type: String, required: true},
|
||||
password: String,
|
||||
authData: [],
|
||||
email: String,
|
||||
emailVerified: Boolean,
|
||||
created: Date,
|
||||
lastUpdated: Date
|
||||
}
|
Loading…
Reference in New Issue