UNPKG

user-managements-node-server

Version:

starter for express node server with user managements, authentication authorization

30 lines (28 loc) 628 B
import uuid from 'uuid' const init = uuid => ( (conn, DataTypes) => conn.define('Audit', { id: { type: DataTypes.UUID, allowNull: false, primaryKey: true, defaultValue: () => uuid.v4() }, username: { type: DataTypes.STRING, allowNull: false }, actionName: { type: DataTypes.STRING, allowNull: false }, requestParams: { type: DataTypes.TEXT, allowNull: true } }, { freezeTableName: true }) ) export default init(uuid)