Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement