How to use the INTEGER function from sequelize
Find comprehensive JavaScript sequelize.INTEGER code examples handpicked from public code repositorys.
83 84 85 86 87 88 89 90 91 92
field: 'rss_count', defaultValue: 0 }, sort: { // 排序 type: Seq.INTEGER(10), comment: '排序', field: 'sort' }, is_show: {
115
517
11
GitHub: maoxiaoquan/kite
101 102 103 104 105 106 107 108 109 110
defaultValue: Seq.NOW /* 时间 */ }, // 2019.11.6 11:55新增 is_free: { // 是否免费 type: Seq.INTEGER(6), comment: '是否免费', field: 'is_free' }, pay_type: {
115
516
11
+ 7 other calls in file
GitHub: jsha/blocktogether
201 202 203 204 205 206 207 208 209 210
*/ var BlockBatch = sequelize.define('BlockBatch', { source_uid: Sequelize.BIGINT.UNSIGNED, currentCursor: Sequelize.STRING, complete: Sequelize.BOOLEAN, size: Sequelize.INTEGER }); BlockBatch.hasMany(Block, {onDelete: 'cascade'}); Block.belongsTo(TwitterUser, {foreignKey: 'sink_uid'}); BtUser.hasMany(BlockBatch, {foreignKey: 'source_uid', onDelete: 'cascade'});
74
332
25
GitHub: plamzi/Havoc
63 64 65 66 67 68 69 70 71 72
} }, MobProtoId: Seq.INTEGER, ItemProtoId: Seq.INTEGER }; var char_quest_struct = {
17
93
15
GitHub: fairlayer/fair
222 223 224 225 226 227 228 229 230 231
// who caused us to make this payment (if we're bank)? inward_pubkey: Sequelize.BLOB, // resulting balance resulting_balance: Sequelize.INTEGER }, { indexes: [
16
80
23
GitHub: fairlayer/fair
95 96 97 98 99 100 101 102 103 104
}) const Debt = sequelize.define('debt', { asset: Sequelize.INTEGER, amount_left: Sequelize.INTEGER, oweTo: Sequelize.INTEGER }) // onchain balances (w/o bank) const Balance = sequelize.define('balance', {
16
80
23
+ 11 other calls in file
GitHub: hinson0/task-board
22 23 24 25 26 27 28 29 30 31
msg: '优先级最大值为5', }, } }, status: { type: Sequelize.INTEGER }, create_time: { type: Sequelize.INTEGER, allowNull: false,
35
61
22
25 26 27 28 29 30 31 32 33 34
var Sequelize = require('sequelize'); exports._STRING = Sequelize.STRING; exports._CHAR = Sequelize.CHAR; exports._TEXT = Sequelize.TEXT; exports._INTEGER = Sequelize.INTEGER; exports._BIGINT = Sequelize.BIGINT; exports._BIGINT0 = Sequelize.BIGINT; exports._FLOAT = Sequelize.FLOAT; exports._FLOAT0 = Sequelize.FLOAT;
10
15
25
+ 9 other calls in file
10 11 12 13 14 15 16 17 18 19
console.log(arg1) console.log(arg2) }; schema.Types = {}; schema.Types.ObjectId = Sequelize.INTEGER; schema.prototype.add = function (args , parentKey) { console.log('dbObj::Schema::add') console.log(args)
0
9
2
18 19 20 21 22 23 24 25 26 27
heading: Sequelize.INTEGER, location: Sequelize.GEOGRAPHY, power: Sequelize.INTEGER, shift_state: Sequelize.CHAR, range: Sequelize.INTEGER, est_range: Sequelize.INTEGER }, { timestamps: true, underscored: true });
0
3
2
197 198 199 200 201 202 203 204 205 206
}; if (fieldName === 'id') { output.primaryKey = true; output.autoIncrement = true; output.type = Sequelize.INTEGER.UNSIGNED; } if (schema.keys.indexOf(fieldName) !== -1) { output.unique = 'uniquerow';
6
0
6
GitHub: LaCherCha1/kissha
0 1 2 3 4 5 6 7 8 9
const DataTypes = require('sequelize'); const mysql = require('../database'); module.exports = mysql.define('products', { 'id': { type: DataTypes.INTEGER(11), allowNull: false, primaryKey: true, comment: "null", autoIncrement: true
1
2
2
+ 7 other calls in file
8 9 10 11 12 13 14 15 16 17
type: Sequelize.STRING(150), field: 'name', allowNull: false }, ownerId: { type: Sequelize.INTEGER(), field: 'owner_id', allowNull: false }, slug: {
0
2
3
0 1 2 3 4 5 6 7 8 9 10
const Sequelize = require("sequelize"); const sequelize = require("./connectToDB"); const Expense = sequelize.define("expenses", { id: { type: Sequelize.INTEGER.UNSIGNED, autoIncrement: true, primaryKey: true, timestamps: true, },
0
0
0
sequelize.col is the most popular function in sequelize (1002 examples)