@speakr/speakr-module-services
Version:
SPEAKR Shared Service Module
67 lines (63 loc) • 1.31 kB
JavaScript
'use strict';
let _ = require('underscore');
module.exports = function(sequelize, DataTypes) {
let reports = sequelize.define('reports', {
title: {
type: DataTypes.STRING,
allowNull: true
},
body: {
type: DataTypes.STRING,
allowNull: true
},
total_impression: {
type: DataTypes.INTEGER,
allowNull: true
},
total_engagement: {
type: DataTypes.INTEGER,
allowNull: true
},
value: {
type: DataTypes.INTEGER,
allowNull: true
},
cost: {
type: DataTypes.INTEGER,
allowNull: true
},
created_at: {
type: DataTypes.DATE,
allowNull: false
},
updated_at: {
type: DataTypes.DATE,
allowNull: true
},
faveme_id: {
type: DataTypes.STRING,
allowNull: false
},
deleted: {
type: DataTypes.BOOLEAN,
allowNull: true
},
start: {
type: DataTypes.DATE,
allowNull: true
},
end: {
type: DataTypes.DATE,
allowNull: true
},
upload_link: {
type: DataTypes.STRING,
allowNull: true
}
},
{
underscored: true,
paranoid: true
});
return reports;
};