"use strict";

module.exports = (sequelize, DataTypes) => {
  const RealEstateRequest = sequelize.define(
    "RealEstateRequest",
    {
      uniqueId: {
        type: DataTypes.UUID,
        defaultValue: DataTypes.UUIDV4,
        allowNull: false
      },
      realEstateType: DataTypes.STRING,
      email: DataTypes.STRING,
      region: DataTypes.STRING,
      municipality: DataTypes.STRING,
      sizeMin: DataTypes.INTEGER,
      sizeMax: DataTypes.INTEGER,
      gardenSizeMin: DataTypes.INTEGER,
      gardenSizeMax: DataTypes.INTEGER,
      priceMin: DataTypes.INTEGER,
      priceMax: DataTypes.INTEGER,
      boundingBox: DataTypes.GEOMETRY("POINT", 4326),
      subscribed: DataTypes.BOOLEAN,
      locationInput: DataTypes.STRING
    },
    {}
  );
  RealEstateRequest.associate = function(models) {
    // associations can be defined here
  };
  return RealEstateRequest;
};
