Saving and fetching of documents

This commit is contained in:
Jori Lallo
2016-05-19 20:46:34 -07:00
parent 58e588a6fd
commit 4430a3129e
14 changed files with 332 additions and 16 deletions

View File

@ -7,11 +7,11 @@ import Team from './Team';
const Document = sequelize.define('document', {
id: { type: DataTypes.UUID, defaultValue: DataTypes.UUIDV4, primaryKey: true },
name: DataTypes.STRING,
content: DataTypes.STRING,
title: DataTypes.STRING,
text: DataTypes.TEXT,
});
Document.belongsTo(Atlas);
Document.belongsTo(Atlas, { as: 'atlas' });
Document.belongsTo(Team);
export default Atlas;
export default Document;