-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Нуриев Михаил #40
Нуриев Михаил #40
Conversation
🍏 Пройден линтинг и базовые тесты |
🍏 Пройден линтинг и базовые тесты |
models/review.js
Outdated
isApproved: { | ||
type: DataTypes.BOOLEAN, | ||
defaultValue: false | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не хватает полей userId и souvenirId
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
И нужно такие поля (указывающие на другие таблицы) везде добавить, что-бы явно указать связь
models/souvenir.js
Outdated
primaryKey: true, | ||
autoIncrement: true | ||
}, | ||
name: { type: DataTypes.STRING }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Сделать имя и цену обязательными
models/souvenir.js
Outdated
image: { type: DataTypes.STRING }, | ||
rating: { type: DataTypes.DOUBLE }, | ||
price: { type: DataTypes.DOUBLE }, | ||
amount: { type: DataTypes.INTEGER }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
количество по умолчанию равным 0
models/souvenir.js
Outdated
autoIncrement: true | ||
}, | ||
name: { type: DataTypes.STRING }, | ||
image: { type: DataTypes.STRING }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тип string по умолчанию имеет длину 255 символов, ссылка на картинку может быть длиннее, нужно увеличить длину до 1024
models/user.js
Outdated
primaryKey: true, | ||
autoIncrement: true | ||
}, | ||
login: { type: DataTypes.STRING } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
логин должен быть уникальным
🍏 Пройден линтинг и базовые тесты |
No description provided.