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