/
astafievk
/
source_code
Обзор
Документация
Войти
/
astafievk
/
source_code
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Api/Models/WorkPhoto.js
30 строк
624 B
astafievK
source code
21 июн 2024, 21:02
21 июн 2024, 21:02
37a1d03
Код
Авторство
О чём код?
const { DataTypes } = require('sequelize'); const sequelize = require('../database'); const Image = sequelize.define('work_photo', { idWorkPhoto: { type: DataTypes.INTEGER, allowNull: false, primaryKey: true, autoIncrement: true }, idImage: { type: DataTypes.INTEGER, unique: true, references: { model: 'image', key: 'id' } }, idEmployee: { type: DataTypes.INTEGER, unique: true, references: { model: 'employee', key: 'id' } } }) module.exports = Image;