Added migrations and saving real estate type correctly

This commit is contained in:
Senad Uka
2019-04-20 05:26:14 +02:00
parent c534c1ee34
commit 298c901759
13 changed files with 157 additions and 54 deletions

15
app/models/marketalert.js Normal file
View File

@@ -0,0 +1,15 @@
'use strict';
module.exports = (sequelize, DataTypes) => {
const MarketAlert = sequelize.define('MarketAlert', {
olxUrl: DataTypes.STRING,
lastDate: DataTypes.STRING,
email: {
type: DataTypes.STRING,
allowNul: false
}
}, {});
MarketAlert.associate = function(models) {
// associations can be defined here
};
return MarketAlert;
};