Skip to content

Commit

Permalink
Fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksamagicka committed Apr 29, 2024
1 parent bb4aac6 commit 5f4597b
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 60 deletions.
Original file line number Diff line number Diff line change
@@ -1,37 +1,36 @@
'use strict';
/** @type {import('sequelize-cli').Migration} */
module.exports = {
async up(queryInterface, Sequelize) {
await queryInterface.createTable('Paranets', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
name: {
type: Sequelize.STRING
},
description: {
type: Sequelize.STRING
},
paranetId: {
type: Sequelize.STRING
},
kaCount: {
type: Sequelize.INTEGER
},
createdAt: {
allowNull: false,
type: Sequelize.DATE
},
updatedAt: {
allowNull: false,
type: Sequelize.DATE
}
});
},
async down(queryInterface, Sequelize) {
await queryInterface.dropTable('Paranets');
}
};
async up(queryInterface, Sequelize) {
await queryInterface.createTable('Paranets', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER,
},
name: {
type: Sequelize.STRING,
},
description: {
type: Sequelize.STRING,
},
paranetId: {
type: Sequelize.STRING,
},
kaCount: {
type: Sequelize.INTEGER,
},
createdAt: {
allowNull: false,
type: Sequelize.DATE,
},
updatedAt: {
allowNull: false,
type: Sequelize.DATE,
},
});
},
async down(queryInterface) {
await queryInterface.dropTable('Paranets');
},
};
51 changes: 26 additions & 25 deletions src/modules/repository/implementation/sequelize/models/paranet.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
'use strict';
const {
Model
} = require('sequelize');
module.exports = (sequelize, DataTypes) => {
class Paranet 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
import { Model } from 'sequelize';

export default (sequelize, DataTypes) => {
class Paranet 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() {
// define association here
}
}
}
Paranet.init({
name: DataTypes.STRING,
description: DataTypes.STRING,
paranetId: DataTypes.STRING,
kaCount: DataTypes.INTEGER
}, {
sequelize,
modelName: 'Paranet',
});
return Paranet;
};
Paranet.init(
{
name: DataTypes.STRING,
description: DataTypes.STRING,
paranetId: DataTypes.STRING,
kaCount: DataTypes.INTEGER,
},
{
sequelize,
modelName: 'Paranet',
},
);
return Paranet;
};

0 comments on commit 5f4597b

Please sign in to comment.