"use strict";

module.exports = function(sequelize, DataTypes) {
  var PageType =  sequelize.define('PageType', {
	id: {type: DataTypes.INTEGER, unique: false, primaryKey: true},
	nombre: DataTypes.STRING(50)
  }, {
    classMethods: {
      associate: function(models) {
        PageType.hasMany(models.Page, {foreignKey: 'tipo'});
      }
    }
  });

  return PageType;
};