sequelize-sequenced
v1.0.1
Published
Sequelize plugin to generate scoped sequential IDs
Downloads
11
Readme
var Sequelize = require('sequelize');
require('sequelize-sequenced')(Sequelize);
var Item = sequelize.define('items', {
prettyId: {
type: Sequelize.SEQUENCED, // Just an integer field
sequenceScope: ['thingId', 'other'] // fields that must be unique
}
});