How to use the ENUM function from sequelize
Find comprehensive JavaScript sequelize.ENUM code examples handpicked from public code repositorys.
245 246 247 248 249 250 251 252 253 254
allowNull: true, defaultValue: 0.00, field: 'TotalAmount' }, status: { type: DataTypes.ENUM('PROCESSING','SHIPPED','UNKNOWN'), allowNull: false, defaultValue: "UNKNOWN", field: 'Status' }
500
0
59
+ 3 other calls in file
GitHub: fairlayer/fair
45 46 47 48 49 50 51 52 53 54
type: Sequelize.INTEGER, defaultValue: 0 }, status: { type: Sequelize.ENUM( 'master', 'sent', 'merge', 'disputed',
16
80
23
58 59 60 61 62 63 64
exports._RANGE = Sequelize.RANGE; exports._GEOMETRY = Sequelize.GEOMETRY; exports._GEOGRAPHY = Sequelize.GEOGRAPHY; exports._VIRTUAL = Sequelize.VIRTUAL; exports._ENUM = function (arr) { return Sequelize.ENUM.apply(this, arr); };
10
15
25
+ 9 other calls in file
GitHub: pola/enqueue
155 156 157 158 159 160 161 162 163 164
timestamp: { type: Sequelize.BIGINT, allowNull: false }, type: { type: Sequelize.ENUM('OPEN', 'CLOSE', 'DESCRIPTION'), allowNull: false }, data: Sequelize.TEXT, queue_id: {
1
3
2
+ 7 other calls in file
GitHub: Team-Feast/dinner-party
1 2 3 4 5 6 7 8 9 10
const db = require('../db') const uuidv1 = require('uuid/v1') const Guest = db.define('guest', { status: { type: Sequelize.ENUM('attending', 'invited', 'declined'), defaultValue: 'invited' }, firstName: Sequelize.STRING, email: {
1
3
1
GitHub: sudoku-jm/Node
14 15 16 17 18 19 20 21 22 23
password: { type: Sequelize.STRING(100), allowNull: true, }, provider: { type: Sequelize.ENUM('local', 'kakao'), allowNull: false, defaultValue: 'local', }, snsId: {
0
0
0
2 3 4 5 6 7 8 9 10 11 12
const { models } = require("../db") const {createMatrix, fillInBlanks } = require("../../algorithm") const Preference = db.define("preference", { preference: { type: Sequelize.ENUM('like', 'dislike'), allowNull: false, validate: { notEmpty: true }
0
0
0
158 159 160 161 162 163 164 165 166 167 168
const User = sequelize.define( "User", { role: { type: Sequelize.ENUM("SUPERADMIN", "RESELLER", "HOTEL", "USER"), allowNull: false, }, password: { type: Sequelize.STRING,
0
0
0
GitHub: kimbbb/node.js
5 6 7 8 9 10 11 12 13 14
host: { type: Sequelize.STRING(80), allowNull: false, }, type: { type: Sequelize.ENUM('free', 'premium'), allowNull: false, }, clientSecret: { type: Sequelize.UUID,
0
0
0
GitHub: RioDisrupt/rescue-me
17 18 19 20 21 22 23 24 25 26
emergency: { type: BOOLEAN, defaultValue: false }, rescued: { type: ENUM('yes', 'no', 'in progress'), defaultValue: 'no' }, latitude: { type: DOUBLE,
0
0
2
+ 3 other calls in file
sequelize.col is the most popular function in sequelize (1002 examples)