Files
Dmitrium12 a059bcb196 первый коммит, надеюсь последний.
Сделанно:
1. минимально рабочий бэк
2. 2 модели
3. 1 миграция
2023-07-09 17:35:12 +07:00

25 lines
567 B
JavaScript

'use strict';
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({
username: DataTypes.STRING,
email: DataTypes.STRING,
password: DataTypes.STRING
}, {
sequelize,
modelName: 'user',
});
return user;
};