UNPKG

giganet_conecta

Version:

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

298 lines (292 loc) 8.84 kB
const { Model, DataTypes } = require("sequelize"); module.exports = Usuarios_Grupo async function Usuarios_Grupo(sequelize) { class Model_Usuarios_Grupo extends Model { } Model_Usuarios_Grupo.init({ id: { autoIncrement: true, type: DataTypes.INTEGER, allowNull: false, primaryKey: true }, grupo: { type: DataTypes.STRING(150), allowNull: false }, descricao: { type: DataTypes.TEXT, allowNull: true }, permissao_tipo: { type: DataTypes.ENUM('L', 'B'), allowNull: false, defaultValue: "L" }, permissao_bt_form: { type: DataTypes.ENUM('L', 'H', 'S', 'E'), allowNull: false, defaultValue: "H" }, permissao_campo_form: { type: DataTypes.ENUM('L', 'H', 'S', 'E'), allowNull: false, defaultValue: "H" }, poermissao_bt_grid: { type: DataTypes.ENUM('L', 'H', 'S', 'E'), allowNull: false, defaultValue: "H" }, filtrar_filiais: { type: DataTypes.ENUM('S', 'N'), allowNull: false, defaultValue: "N" }, redes: { type: DataTypes.STRING(1000), allowNull: true, defaultValue: "10.0.0.0\/8;172.16.0.0\/12;192.168.0.0\/16;" }, horarios: { type: DataTypes.STRING(500), allowNull: true }, exporta_xls: { type: DataTypes.ENUM('S', 'N'), allowNull: true, defaultValue: "N" }, permite_atualizar: { type: DataTypes.ENUM('S', 'N'), allowNull: true, defaultValue: "N" }, qtde_liberacoes: { type: DataTypes.INTEGER, allowNull: false }, tipo_alcada: { type: DataTypes.ENUM('ADM', 'SUP', 'OP'), allowNull: false, defaultValue: "ADM" }, dashboard_padrao: { type: DataTypes.STRING(30), allowNull: true, defaultValue: "dash_principal" }, dash_principal: { type: DataTypes.ENUM('P', 'M', 'E'), allowNull: true, defaultValue: "P" }, dash_financeiro: { type: DataTypes.ENUM('P', 'M', 'E'), allowNull: true, defaultValue: "P" }, dash_ordem_servico: { type: DataTypes.ENUM('P', 'M', 'E'), allowNull: true, defaultValue: "P" }, dash_crm: { type: DataTypes.ENUM('P', 'M', 'E'), allowNull: true, defaultValue: "P" }, dash_contratos: { type: DataTypes.ENUM('P', 'M', 'E'), allowNull: true, defaultValue: "P" }, dash_atendimento: { type: DataTypes.ENUM('P', 'M', 'E'), allowNull: true, defaultValue: "P" }, dash_acessos: { type: DataTypes.ENUM('P', 'M', 'E'), allowNull: true, defaultValue: "P" }, dash_contas_a_receber: { type: DataTypes.ENUM('P', 'M', 'E'), allowNull: true, defaultValue: "P" }, permite_chamar_suporte: { type: DataTypes.ENUM('S', 'N'), allowNull: true, defaultValue: "S" }, dash_contas_a_pagar: { type: DataTypes.ENUM('P', 'M', 'E'), allowNull: true, defaultValue: "P" }, dash_cliente_chave: { type: DataTypes.ENUM('P', 'M', 'E'), allowNull: true, defaultValue: "P" }, dash_crm_user: { type: DataTypes.ENUM('P', 'M', 'E'), allowNull: true, defaultValue: "P" }, dash_cobrancas: { type: DataTypes.ENUM('P', 'M', 'E'), allowNull: true, defaultValue: "P" }, mostrar_requisicao_material: { type: DataTypes.INTEGER, allowNull: true }, filtrar_requisicao_material: { type: DataTypes.ENUM('S', 'N'), allowNull: false, defaultValue: "N" }, dash_serverinfo: { type: DataTypes.ENUM('P', 'M', 'E'), allowNull: false, defaultValue: "P" }, dash_ordem_servico_user: { type: DataTypes.ENUM('P', 'M', 'E'), allowNull: true, defaultValue: "P" }, permite_alteracao_data_base_grupo: { type: DataTypes.ENUM('S', 'N'), allowNull: false, defaultValue: "N" }, filtrar_grid_os_cliente: { type: DataTypes.ENUM('S', 'N'), allowNull: false, defaultValue: "S" }, fiberdocs_filtro_filial: { type: DataTypes.ENUM('S', 'N'), allowNull: true, defaultValue: "N" }, habilitar_barra_pesquisa: { type: DataTypes.ENUM('S', 'N'), allowNull: true, defaultValue: "S" }, visualizar_auditoria: { type: DataTypes.ENUM('S', 'N'), allowNull: false, defaultValue: "S" }, dash_crm_corporativo: { type: DataTypes.ENUM('P', 'M', 'E'), allowNull: true, defaultValue: "P" }, dash_crm_pessoa_fisica: { type: DataTypes.ENUM('P', 'M', 'E'), allowNull: true, defaultValue: "P" }, permite_listar_caixas_usuario: { type: DataTypes.ENUM('S', 'N'), allowNull: true, defaultValue: "N" }, permite_listar_caixas: { type: DataTypes.ENUM('S', 'N'), allowNull: true, defaultValue: "S" }, acesso_querybuilder: { type: DataTypes.ENUM('S', 'N'), allowNull: false, defaultValue: "N" }, acesso_upvoty_ixc: { type: DataTypes.ENUM('S', 'N'), allowNull: true, defaultValue: "N" }, expire_password: { type: DataTypes.ENUM('0', '3', '6', '9', '12'), allowNull: true, defaultValue: "0" }, visualizar_retro: { type: DataTypes.ENUM('S', 'N'), allowNull: false, defaultValue: "N" }, visualizar_visoes_querybuilder: { type: DataTypes.ENUM('S', 'N'), allowNull: false, defaultValue: "N" }, dash_negociacoes: { type: DataTypes.ENUM('P', 'M', 'E'), allowNull: true, defaultValue: "P" }, dash_monitoramento_fibra: { type: DataTypes.ENUM('P', 'M', 'E'), allowNull: true, defaultValue: "P" }, dash_radius: { type: DataTypes.ENUM('P', 'M', 'E'), allowNull: true, defaultValue: "P" }, filtra_grid_filial: { type: DataTypes.ENUM('S', 'N'), allowNull: true, defaultValue: "S" }, permissao_retrospectiva: { type: DataTypes.ENUM('P', 'H', 'E'), allowNull: false, defaultValue: "P" }, filtrar_transferencia_material_confirmacao: { type: DataTypes.ENUM('S', 'N'), allowNull: false, defaultValue: "N" }, tempo_limite_sessao_minutos: { type: DataTypes.INTEGER.UNSIGNED, allowNull: false, defaultValue: 0 }, enable_totp_group: { type: DataTypes.TINYINT.UNSIGNED, allowNull: false, defaultValue: 0 }, config_totp_access: { type: DataTypes.ENUM('A', 'R', 'AR'), allowNull: true } }, { sequelize, tableName: 'usuarios_grupo', timestamps: false, indexes: [ { name: "PRIMARY", unique: true, using: "BTREE", fields: [ { name: "id" }, ] }, ] }); return Model_Usuarios_Grupo }