SHARE
TWEET

Untitled

a guest Jun 25th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const Sequelize = require("sequelize");
  2. const sequelize = require("../config/db.js")
  3. const Faqs = require("./faqs")
  4.  
  5.  
  6.  
  7. const Categoria = sequelize.define('categoria',{
  8.     nomept:{
  9.         type: Sequelize.STRING,
  10.         unique: true,
  11.         allowNull:false
  12.     },
  13.     nomeen:{
  14.         type: Sequelize.STRING,
  15.         unique: true,
  16.         allowNull:false
  17.     },
  18.     nomefr:{
  19.         type: Sequelize.STRING,
  20.         unique: true,
  21.         allowNull:false
  22.     }
  23.  
  24. })
  25.  
  26. Categoria.hasMany(Faqs)
  27. Categoria.sync()
  28.  
  29. module.exports = Categoria
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top