%PDF- %PDF-
| Direktori : /home/opti/workflow/src/models/ |
| Current File : /home/opti/workflow/src/models/itemdocument.js |
'use strict';
module.exports = (sequelize, DataTypes) => {
const ItemDocument = sequelize.define('ItemDocument', {
uuid: {
type: DataTypes.UUID,
defaultValue: DataTypes.UUIDV4
},
orgId: DataTypes.INTEGER,
itemId: DataTypes.INTEGER,
name: DataTypes.STRING,
filename: DataTypes.STRING,
type: DataTypes.STRING,
size: DataTypes.STRING,
createdBy: DataTypes.INTEGER
}, {});
ItemDocument.associate = function(models) {
// associations can be defined here
ItemDocument.belongsTo(models.Item, {foreignKey: 'itemId', as: 'item'});
};
return ItemDocument;
};