const Sequelize = require('sequelize'); module.exports = function(sequelize, DataTypes) { return sequelize.define('OnboardingSurvey', { id: { autoIncrement: true, type: DataTypes.INTEGER, allowNull: false, primaryKey: true }, group_key: { type: DataTypes.STRING(10), allowNull: false }, answers_key: { type: DataTypes.STRING(25), allowNull: false }, answers: { type: DataTypes.STRING(100), allowNull: true }, status: { type: DataTypes.INTEGER, allowNull: true, defaultValue: 1 }, added: { type: DataTypes.DATE, allowNull: true, defaultValue: Sequelize.Sequelize.fn('now') } }, { sequelize, tableName: 'onboarding_survey', schema: 'public', timestamps: false }); };