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