Skip to content

Commit

Permalink
Ajuste Estructura Sequelize
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidAlejandroSaenzMeneses committed Feb 15, 2022
1 parent 85dc729 commit 33d2983
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 30 deletions.
9 changes: 9 additions & 0 deletions .sequelizerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const path = require("path");

module.exports = {
'config': path.resolve('./config','config.json'),
'models-path': path.resolve('./src', 'models'),
'seeders-path': path.resolve('./src/database', 'seeders'),
'migrations-path': path.resolve('./src/database', 'migrations'),
}

File renamed without changes.
6 changes: 0 additions & 6 deletions models/Author.js → src/models/Author.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@
const { Model } = require('sequelize');
module.exports = (sequelize, DataTypes) => {
class User extends Model {
/**
* Helper method for defining associations.
* This method is not a part of Sequelize lifecycle.
* The `models/index` file will call this method automatically.
*/
static associate(models) {
// define association here
}
}
User.init({
Expand Down
6 changes: 0 additions & 6 deletions models/Book.js → src/models/Book.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@
const { Model } = require('sequelize');
module.exports = (sequelize, DataTypes) => {
class User extends Model {
/**
* Helper method for defining associations.
* This method is not a part of Sequelize lifecycle.
* The `models/index` file will call this method automatically.
*/
static associate(models) {
// define association here
}
}
User.init({
Expand Down
6 changes: 0 additions & 6 deletions models/Genre.js → src/models/Genre.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@
const { Model } = require('sequelize');
module.exports = (sequelize, DataTypes) => {
class User extends Model {
/**
* Helper method for defining associations.
* This method is not a part of Sequelize lifecycle.
* The `models/index` file will call this method automatically.
*/
static associate(models) {
// define association here
}
}
User.init({
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@
const { Model } = require('sequelize');
module.exports = (sequelize, DataTypes) => {
class User extends Model {
/**
* Helper method for defining associations.
* This method is not a part of Sequelize lifecycle.
* The `models/index` file will call this method automatically.
*/
static associate(models) {
// define association here
}
}
User.init({
Expand Down
6 changes: 0 additions & 6 deletions models/User.js → src/models/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@
const {Model} = require('sequelize');
module.exports = (sequelize, DataTypes) => {
class User extends Model {
/**
* Helper method for defining associations.
* This method is not a part of Sequelize lifecycle.
* The `models/index` file will call this method automatically.
*/
static associate(models) {
// define association here
}
}
User.init({
Expand Down
File renamed without changes.

0 comments on commit 33d2983

Please sign in to comment.