Created
May 30, 2018 09:18
-
-
Save lvturner/63868ed482d4d3c8194633c7ed1a99d2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| const Sequelize = require('sequelize'); | |
| module.exports = (db) => { | |
| return db.define('coin_market_cap_item',{ | |
| // might need to get smarter with this id | |
| coin_id: { | |
| type: Sequelize.INTEGER | |
| }, | |
| name: { | |
| type: Sequelize.STRING | |
| }, | |
| symbol: { | |
| type: Sequelize.STRING | |
| }, | |
| website_slug: { | |
| type: Sequelize.STRING | |
| }, | |
| rank: { | |
| type: Sequelize.INTEGER | |
| }, | |
| circulating_supply: { | |
| type: Sequelize.FLOAT | |
| }, | |
| total_supply: { | |
| type: Sequelize.FLOAT | |
| }, | |
| max_supply: { | |
| type: Sequelize.FLOAT | |
| }, | |
| quote_usd_price: { | |
| type: Sequelize.FLOAT | |
| }, | |
| quote_usd_volume_24h: { | |
| type: Sequelize.FLOAT | |
| }, | |
| quote_usd_market_cap: { | |
| type: Sequelize.FLOAT | |
| }, | |
| quote_usd_percent_change_1h: { | |
| type: Sequelize.FLOAT | |
| }, | |
| quote_usd_percent_change_24h: { | |
| type: Sequelize.FLOAT | |
| }, | |
| quote_usd_percent_change_7d: { | |
| type: Sequelize.FLOAT | |
| }, | |
| last_updated: { | |
| type: Sequelize.INTEGER | |
| }, | |
| timestamp: { | |
| type: Sequelize.INTEGER, | |
| primaryKey: true | |
| } | |
| }); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment