"use strict";

module.exports = function(sequelize, DataTypes) {
  var PerMinutesMeanEvent =  sequelize.define('PerMinutesMeanEvent', {
	date: DataTypes.DATE,
	type: DataTypes.INTEGER,
	value: DataTypes.STRING,
	address: DataTypes.INTEGER,
	comment: DataTypes.TEXT
  }, {
    classMethods: {
      associate: function(models) {
        PerMinutesMeanEvent.belongsTo(models.SensorLocation, {foreignKey: 'address'});
      }
    }
  });

  return PerMinutesMeanEvent;
};