Advertisement
Guest User

Untitled

a guest
Jul 4th, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'use strict';
  2. module.exports = (sequelize, DataTypes) => {
  3.   const categoria = sequelize.define('categoria', {
  4.     nomept:{
  5.       type: DataTypes.STRING,
  6.       unique: true,
  7.       allowNull:false
  8.     },
  9.     nomeen:{
  10.       type: DataTypes.STRING,
  11.       unique: true,
  12.       allowNull:false
  13.     },
  14.     nomefr:{
  15.       type: DataTypes.STRING,
  16.       unique: true,
  17.       allowNull:false
  18.     },
  19.   }, {});
  20.   categoria.associate = function(models) {
  21.     // categoria hasmany faqs
  22.     categoria.hasMany(models.faqs)
  23.   };
  24.   return categoria;
  25. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement