@speakr/speakr-module-services
Version:
SPEAKR Shared Service Module
27 lines (24 loc) • 557 B
JavaScript
;
let _ = require('underscore');
module.exports = function (sequelize, DataTypes) {
return sequelize.define('creatives_status_types', {
id: {
type: DataTypes.INTEGER,
autoIncrement: true,
primaryKey: true,
allowNull: false
},
platform_id: DataTypes.INTEGER,
type: {
type: DataTypes.TEXT,
field: 'speakr'
}
}, {
instanceMethods: {
toPublicJSON: function () {
let json = this.toJSON();
return _.pick(json, 'id', 'platform_id', 'type');
}
}
});
};