Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import sentenceCase from 'sentence-case';
import uniqueRandom from 'unique-random';
import dotenv from 'dotenv';
dotenv.config();
const randomId =
uniqueRandom(process.env.ISBNRANDOM_MIN_ID, process.env.ISBNRANDOM_MAX_ID);
export default(sequelize, DataTypes) => {
const Books = sequelize.define('Books', {
title: {
type: DataTypes.STRING,
allowNull: false,
trim: true,
unique: 'compositeIndex'
},
author: {
type: DataTypes.STRING,
allowNull: false,
trim: true,
unique: 'compositeIndex',
},
ISBN: {