Added a new model - does not work yet

This commit is contained in:
Senad Uka
2019-04-16 06:27:11 +02:00
parent 2380c85122
commit c534c1ee34
5 changed files with 784 additions and 3 deletions

View File

@@ -0,0 +1,25 @@
const Sequelize = require("sequelize");
const sequelize = require("../db/db");
const RealEstateRequest = sequelize.define("real_estate_request", {
id: {
type: Sequelize.INTEGER,
autoIncrement: true,
primaryKey: true
},
unique_id: {
type: Sequelize.UUID,
defaultValue: Sequelize.UUIDV4,
allowNull: false,
},
real_estate_type: {
type: Sequelize.ENUM,
values: ['kuca', 'stan', 'vikendica']
},
email: {
type: Sequelize.STRING,
allowNull: true
}
});
module.exports = RealEstateRequest;