ebac854da8
* The MongoDB/Mongoose data storage is removed in favor of Sequelize. This abstracts over SQLite or RDBMs like PostgreSQL and MSSQL. The default is SQLite, which significantly simplifies deployments in end-user environments. * As Spacedeck now has no more mandatory server dependencies, we can wrap it in Electron and ship it as a desktop application. * Removes docker-compose.yml * First version of import UI
35 lines
553 B
JavaScript
35 lines
553 B
JavaScript
'use strict';
|
|
|
|
// FIXME port this last model
|
|
|
|
var mongoose = require('mongoose');
|
|
var Schema = mongoose.Schema;
|
|
|
|
module.exports.actionSchema = mongoose.Schema({
|
|
space: {
|
|
type: Schema.Types.ObjectId,
|
|
ref: 'Space'
|
|
},
|
|
user: {
|
|
type: Schema.Types.ObjectId,
|
|
ref: 'User'
|
|
},
|
|
editor_name: String,
|
|
action: String,
|
|
object: Schema.Types.Mixed,
|
|
created_at: {
|
|
type: Date,
|
|
default: Date.now
|
|
},
|
|
updated_at: {
|
|
type: Date,
|
|
default: Date.now
|
|
}
|
|
});
|
|
|
|
module.exports.actionSchema.index({
|
|
space: 1,
|
|
created_at: 1
|
|
});
|
|
|