Skip to content

Instantly share code, notes, and snippets.

@lvturner
Created May 30, 2018 09:18
Show Gist options
  • Select an option

  • Save lvturner/63868ed482d4d3c8194633c7ed1a99d2 to your computer and use it in GitHub Desktop.

Select an option

Save lvturner/63868ed482d4d3c8194633c7ed1a99d2 to your computer and use it in GitHub Desktop.
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