Added more views and atlas APIs
This commit is contained in:
@ -4,9 +4,19 @@ import {
|
||||
} from '../sequelize';
|
||||
import Team from './Team';
|
||||
|
||||
const allowedAtlasTypes = [['atlas', 'journal']];
|
||||
|
||||
const Atlas = sequelize.define('atlas', {
|
||||
id: { type: DataTypes.UUID, defaultValue: DataTypes.UUIDV4, primaryKey: true },
|
||||
name: DataTypes.STRING,
|
||||
description: DataTypes.STRING,
|
||||
type: { type: DataTypes.STRING, validate: { isIn: allowedAtlasTypes }},
|
||||
}, {
|
||||
instanceMethods: {
|
||||
getRecentDocuments() {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Atlas.belongsTo(Team);
|
||||
|
Reference in New Issue
Block a user