How to use the NOW function from sequelize

Find comprehensive JavaScript sequelize.NOW code examples handpicked from public code repositorys.

45
46
47
48
49
50
51
52
53
54
  defaultValue: 'open'
},
lockedTill: {
  type: Sequelize.DATE,
  allowNull: false,
  defaultValue: Sequelize.NOW
},
lockedBy: {
  type: Sequelize.STRING
},
fork icon13
star icon15
watch icon24

45
46
47
48
49
50
51
52
53
54
exports._BLOB      = Sequelize.BLOB;
exports._DATE      = Sequelize.DATE;
exports._DATE0     = Sequelize.DATE;
exports._DATEONLY  = Sequelize.DATEONLY;
exports._TIME      = Sequelize.TIME;
exports._NOW       = Sequelize.NOW;
exports._UUID      = Sequelize.UUID;
exports._UUIDV1    = Sequelize.UUIDV1;
exports._UUIDV4    = Sequelize.UUIDV4;
exports._HSTORE    = Sequelize.HSTORE;
fork icon10
star icon15
watch icon25

+ 9 other calls in file

44
45
46
47
48
49
50
51
52
53
        attributes.validate = attributes.validate || {};
        attributes.max = value;
},
default: function(column, attributes, value) {
        if (column.dataType == 'date' && value == 'now') {
                value = Sequelize.NOW;
        }
        attributes.defaultValue = value;
},
fk: function(column, attributes, value) {
fork icon3
star icon13
watch icon6

+ 2 other calls in file

58
59
60
61
62
63
64
65
66
67
    }
};

const Date = (defaultValue, allowNull) => {
    if (typeof defaultValue === 'undefined') {
        defaultValue = Sequelize.NOW;
    }
    return {
        type: Sequelize.DATE,
        allowNull,
fork icon1
star icon5
watch icon2