connecting to remote mysql db, saving market alerts

This commit is contained in:
egradanin
2019-01-19 16:53:27 +01:00
parent 3cebd722fd
commit 18032c6ca6
12 changed files with 487 additions and 24 deletions

18
backend/MarketAlert.js Normal file
View File

@@ -0,0 +1,18 @@
const Sequelize = require("sequelize");
const sequelize = require("./db.js");
const MarketAlert = sequelize.define("market_alert", {
id: {
type: Sequelize.INTEGER,
autoIncrement: true,
primaryKey: true
},
olx_url: Sequelize.STRING,
last_date: Sequelize.STRING,
email: {
type: Sequelize.STRING,
allowNull: false,
unique: true
}
});
module.exports = MarketAlert;