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