0.3.5 • Published 6 years ago

sequelize-x v0.3.5

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

sequelizex

some useful utilities for sequelize, such as simeple datatype.

Installation

  npm install sequelize-x

simpel Datatype

var sequelizex = require('sequelize-x');
var shortDataTypes = sequelizex.DataTypes;

module.exports = function (sequelize, DataTypes) {

  var Model = sequelize.define('Model', {

    string: shortDataTypes.String(),
    stringWithMaxlength: shortDataTypes.String(256),
    stringAllowNull: shortDataTypes.String(null, true),

    double: shortDataTypes.Double(),
    doubleWithCustomDefaultValue: shortDataTypes.Double(10),

    int: shortDataTypes.Int(),
    intWithCustomDefaultValue: shortDataTypes.Int(10),

    phone: shortDataTypes.Phone(true),
    phoneAllowNull: shortDataTypes.Phone(true),

    text: shortDataTypes.Text(),

    time: shortDataTypes.Date(),
  });

  return Model;
};
0.3.5

6 years ago

0.3.4

7 years ago

0.3.3

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.0

8 years ago