user-managements-node-server
Version:
starter for express node server with user managements, authentication authorization
31 lines (29 loc) • 624 B
JavaScript
import uuid from 'uuid'
const init = uuid => (
(conn, DataTypes) =>
conn.define('ActionVerifications', {
actionId: {
type: DataTypes.UUID,
allowNull: false,
primaryKey: true,
defaultValue: () => uuid.v4()
},
username: {
type: DataTypes.STRING,
allowNull: false
},
actionType: {
type: DataTypes.INTEGER,
allowNull: false
},
deleted: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: false
}
},
{
freezeTableName: true
})
)
export default init(uuid)