This commit is contained in:
2019-06-21 17:01:34 -05:00
commit 487f0c4eeb
56 changed files with 5037 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
/*
* Greeting Model
* -------------------------------------------------------------
* This is a sample model. The schema or structure of the model should
* be specified here. It is then passed to Mongoose and can be accessed
* globally using the model() function.
*/
const Greeting = {
name: String,
}
module.exports = Greeting

14
app/models/Role.model.js Normal file
View File

@@ -0,0 +1,14 @@
/**
* @module flitter-auth/deploy/models/Role
*/
/**
* This model stores the role data from Flitter-auth.
*
* @type {Object}
*/
module.exports = exports = {
name: String,
permissions: [String],
data: String,
}

20
app/models/User.model.js Normal file
View File

@@ -0,0 +1,20 @@
/**
* @module flitter-auth/deploy/models/User
*/
/**
* This model stores the user data from Flitter-auth. The username
* and password fields are fairly self-evident. Password hashes are
* stored instead of cleartext. The data field is for JSON data that
* holds various non-DB essential pieces of information about users.
*
* @type {Object}
*/
module.exports = exports = {
username: String,
password: String,
data: String,
uuid: String,
role: String,
permissions: [String],
}

View File

@@ -0,0 +1,13 @@
/*
* File Model
* -------------------------------------------------------------
* Put some description here!
*/
const File = {
original_name: String,
new_name: String,
mime: String,
type: String,
}
module.exports = exports = File

View File

@@ -0,0 +1,13 @@
/*
* Out Model
* -------------------------------------------------------------
* Put some description here!
*/
const Out = {
project_id: String,
created: { type: Date, default: Date.now },
brief: String,
data: String,
}
module.exports = exports = Out

View File

@@ -0,0 +1,16 @@
/*
* Project Model
* -------------------------------------------------------------
* Put some description here!
*/
const uuid = require('uuid/v4')
const Project = {
name: String,
user_id: String,
archived: { type: Boolean, default: false },
data: String,
shared_user_ids: [String],
uuid: { type: String, default: uuid }
}
module.exports = exports = Project