UNPKG

giganet_conecta

Version:

Aplicação com o fim de facilitar conexões com APi's e Banco de Dados (MySql & Mongo).

77 lines (72 loc) 1.7 kB
const { Model, DataTypes } = require("sequelize"); module.exports = Empresa_Setor; async function Empresa_Setor(sequelize) { class Empresa_Setor extends Model {} Empresa_Setor.init( { id: { autoIncrement: true, type: DataTypes.INTEGER, allowNull: false, primaryKey: true, }, setor: { type: DataTypes.STRING(200), allowNull: false, }, id_chat: { type: DataTypes.INTEGER, allowNull: true, }, id_depto: { type: DataTypes.INTEGER, allowNull: true, }, empresa_setor_chatid_telegram: { type: DataTypes.STRING(200), allowNull: true, }, recebe_telegram_setor: { type: DataTypes.ENUM("S", "N"), allowNull: true, }, token_bot_telegram_setor: { type: DataTypes.INTEGER, allowNull: true, }, ativo: { type: DataTypes.ENUM("S", "N"), allowNull: false, defaultValue: "S", }, cor: { type: DataTypes.STRING(10), allowNull: true, }, }, { sequelize, tableName: "empresa_setor", timestamps: false, indexes: [ { name: "PRIMARY", unique: true, using: "BTREE", fields: [{ name: "id" }], }, { name: "id_depto", using: "BTREE", fields: [{ name: "id_depto" }], }, { name: "id_chat", using: "BTREE", fields: [{ name: "id_chat" }], }, ], } ); return Empresa_Setor; }