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' }
+ 3 other calls in file
GitHub: fairlayer/fair
![fairlayer profile picture](/fairlayer.png?size=40)
45 46 47 48 49 50 51 52 53 54
type: Sequelize.INTEGER, defaultValue: 0 }, status: { type: Sequelize.ENUM( 'master', 'sent', 'merge', 'disputed',
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); };
+ 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: {
+ 7 other calls in file
GitHub: Team-Feast/dinner-party
![Team-Feast profile picture](/Team-Feast.png?size=40)
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: {
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: {
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 }
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,
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,
GitHub: RioDisrupt/rescue-me
![RioDisrupt profile picture](/RioDisrupt.png?size=40)
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,
+ 3 other calls in file
sequelize.col is the most popular function in sequelize (1002 examples)