UNPKG

@speakr/speakr-module-services

Version:
31 lines (26 loc) 566 B
'use strict'; let _ = require('underscore'); module.exports = function (sequelize, DataTypes) { let brands = sequelize.define('brands', { id: { type: DataTypes.INTEGER, allowNull: false, primaryKey: true, autoIncrement: true }, name: { type: DataTypes.STRING }, id_hash: { type: DataTypes.STRING } }, { tableName: 'brandnames', underscored: true }); // brands.prototype.toPublicJSON = function () { // let json = this.toJSON(); // return _.pick(json, 'id', 'name'); // }; return brands; };