Skip to content

Instantly share code, notes, and snippets.

@willshepp28
Last active November 29, 2020 22:25
Show Gist options
  • Save willshepp28/933dfd0512bbfa1a6b8b908f61584d0c to your computer and use it in GitHub Desktop.
Save willshepp28/933dfd0512bbfa1a6b8b908f61584d0c to your computer and use it in GitHub Desktop.
Our league model
'use strict';
const {
Model
} = require('sequelize');
module.exports = (sequelize, DataTypes) => {
class League extends Model {
static associate(models) {}
};
League.init({
name: DataTypes.STRING,
email: DataTypes.STRING,
location: DataTypes.GEOMETRY,
price: DataTypes.DECIMAL
}, {
sequelize,
modelName: 'League',
});
return League;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment