Last active
November 29, 2020 22:25
-
-
Save willshepp28/933dfd0512bbfa1a6b8b908f61584d0c to your computer and use it in GitHub Desktop.
Our league model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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