Gerar Docs

Banco automático

Gerado com SHOW TABLES, SHOW COLUMNS e SHOW INDEX.

failed_jobs

  • id — bigint unsigned • NOT NULL • PRI
  • uuid — varchar(191) • NOT NULL • UNI
  • connection — text • NOT NULL
  • queue — text • NOT NULL
  • payload — longtext • NOT NULL
  • exception — longtext • NOT NULL
  • failed_at — timestamp • NOT NULL

Índices

  • PRIMARY → id
  • failed_jobs_uuid_unique → uuid

migrations

  • id — int unsigned • NOT NULL • PRI
  • migration — varchar(191) • NOT NULL
  • batch — int • NOT NULL

Índices

  • PRIMARY → id

password_resets

  • email — varchar(191) • NOT NULL • MUL
  • token — varchar(191) • NOT NULL
  • created_at — timestamp

Índices

  • password_resets_email_index → email

permissions

  • id — bigint unsigned • NOT NULL • PRI
  • name — varchar(191) • NOT NULL
  • guard_name — varchar(191) • NOT NULL
  • created_at — timestamp
  • updated_at — timestamp

Índices

  • PRIMARY → id

personal_access_tokens

  • id — bigint unsigned • NOT NULL • PRI
  • tokenable_type — varchar(191) • NOT NULL • MUL
  • tokenable_id — bigint unsigned • NOT NULL
  • name — varchar(191) • NOT NULL
  • token — varchar(64) • NOT NULL • UNI
  • abilities — text
  • last_used_at — timestamp
  • created_at — timestamp
  • updated_at — timestamp

Índices

  • PRIMARY → id
  • personal_access_tokens_token_unique → token
  • personal_access_tokens_tokenable_type_tokenable_id_index → tokenable_type, tokenable_id

tblbannedemails

  • id — int • NOT NULL • PRI
  • domain — text • NOT NULL • MUL
  • count — int • NOT NULL

Índices

  • PRIMARY → id
  • domain → domain

tblemail_images

  • id — int unsigned • NOT NULL • PRI
  • filename — varchar(128) • NOT NULL
  • original_name — varchar(128) • NOT NULL
  • created_at — timestamp • NOT NULL
  • updated_at — timestamp • NOT NULL

Índices

  • PRIMARY → id

tblemailmarketer

  • id — int • NOT NULL • PRI
  • name — text • NOT NULL
  • type — text • NOT NULL
  • settings — text • NOT NULL
  • disable — int • NOT NULL
  • marketing — int • NOT NULL
  • created_at — timestamp • NOT NULL
  • updated_at — timestamp • NOT NULL

Índices

  • PRIMARY → id

tblemailmarketer_related_pivot

  • id — int unsigned • NOT NULL • PRI
  • task_id — int unsigned • NOT NULL
  • product_id — int unsigned • NOT NULL
  • addon_id — int unsigned • NOT NULL
  • created_at — timestamp • NOT NULL
  • updated_at — timestamp • NOT NULL

Índices

  • PRIMARY → id

tblemailtemplates

  • id — int • NOT NULL • PRI
  • type — text • NOT NULL • MUL
  • name — text • NOT NULL • MUL
  • subject — text • NOT NULL
  • message — text • NOT NULL
  • attachments — text • NOT NULL
  • fromname — text • NOT NULL
  • fromemail — text • NOT NULL
  • disabled — tinyint(1) • NOT NULL
  • custom — tinyint(1) • NOT NULL
  • language — text • NOT NULL
  • copyto — text • NOT NULL
  • blind_copy_to — text • NOT NULL
  • plaintext — tinyint(1) • NOT NULL
  • created_at — timestamp • NOT NULL
  • updated_at — timestamp • NOT NULL

Índices

  • PRIMARY → id
  • type → type
  • name → name

tblticketmaillog

  • id — int • NOT NULL • PRI
  • date — datetime • NOT NULL
  • to — text • NOT NULL
  • cc — text • NOT NULL
  • name — text • NOT NULL
  • email — text • NOT NULL
  • subject — text • NOT NULL
  • message — text • NOT NULL
  • status — text • NOT NULL
  • attachment — text • NOT NULL

Índices

  • PRIMARY → id

users

  • id — bigint unsigned • NOT NULL • PRI
  • name — varchar(191) • NOT NULL
  • email — varchar(191) • NOT NULL • UNI
  • email_verified_at — timestamp
  • password — varchar(191) • NOT NULL
  • avatar — text • NOT NULL
  • remember_token — varchar(100)
  • created_at — timestamp
  • updated_at — timestamp

Índices

  • PRIMARY → id
  • users_email_unique → email

v_mailbox_message_search

  • id — bigint unsigned • NOT NULL
  • thread_id — bigint unsigned • NOT NULL
  • subject — varchar(255)
  • snippet — varchar(300) • NOT NULL
  • sent_at — datetime
  • from_addr — varchar(255)
  • size — bigint unsigned

v_mailbox_thread_last

  • thread_id — bigint unsigned • NOT NULL
  • account_id — bigint unsigned • NOT NULL
  • folder — varchar(120) • NOT NULL
  • thread_subject — varchar(255)
  • last_at — datetime
  • last_message_id — bigint unsigned
  • last_from — varchar(255)
  • last_to — text
  • last_subject — varchar(255)
  • last_snippet — varchar(300) • NOT NULL

vw_cfg_catalog

vw_gateways_meta_kv

  • gateway — varchar(50)
  • tipo — varchar(50)
  • tipo_id — int
  • chave — varchar(50)
  • valor — varchar(250)

vw_kb_artigos_publicados

  • id — bigint unsigned • NOT NULL
  • space_id — bigint unsigned • NOT NULL
  • category_id — bigint unsigned
  • titulo — varchar(220) • NOT NULL
  • slug — varchar(220) • NOT NULL
  • resumo — varchar(400)
  • published_at — datetime
  • views_cache — int unsigned • NOT NULL
  • helpful_cache — int unsigned • NOT NULL
  • not_helpful_cache — int unsigned • NOT NULL
  • helpful_score — bigint unsigned • NOT NULL

vw_mailbox_threads_list

  • thread_id — bigint unsigned
  • account_id — bigint unsigned
  • folder — varchar(120)
  • subject — varchar(255)
  • last_at — datetime
  • last_msg_id — bigint unsigned
  • last_from — varchar(255)
  • msg_count — bigint
  • unread_count — decimal(23,0)
  • snippet — varchar(160)

vw_meta_expected_linear

  • id_meta — bigint unsigned • NOT NULL
  • dia — date
  • pct_expected — decimal(14,2)

vw_meta_prog_ds

  • id_meta — bigint unsigned • NOT NULL
  • pct_ds — decimal(43,2) • NOT NULL

vw_meta_prog_tarefas

  • id_meta — bigint unsigned • NOT NULL
  • pct_tarefas — decimal(39,2) • NOT NULL

vw_meta_progresso_registros

  • id_meta — bigint unsigned • NOT NULL
  • progresso_registros — decimal(44,2) • NOT NULL

vw_meta_progresso_tarefas

  • id_meta — bigint unsigned • NOT NULL
  • progresso_tarefas — decimal(40,2) • NOT NULL

vw_metas_progress

  • id — bigint unsigned • NOT NULL
  • id_contrato — int
  • titulo — varchar(255) • NOT NULL
  • descricao — text
  • dt_inicio — date • NOT NULL
  • dt_fim — date • NOT NULL
  • unidade — enum('valor','quantidade','percentual') • NOT NULL
  • calc_mode — enum('tarefas','datasources','misto') • NOT NULL
  • peso_tarefas — decimal(5,2) • NOT NULL
  • peso_ds — decimal(5,2) • NOT NULL
  • pct_tarefas — decimal(39,2) • NOT NULL
  • pct_ds — decimal(43,2) • NOT NULL
  • pct_final — decimal(49,2)
  • target_green — decimal(15,4)
  • target_yellow — decimal(15,4)
  • kpi_direction — enum('up','down') • NOT NULL
  • kpi_status — varchar(6) • NOT NULL

vw_parceiros_atendimentos_crm

  • id — int • NOT NULL
  • lead_id — int
  • user_id — int
  • agente_user_id — int • NOT NULL
  • assunto — varchar(150)
  • texto — text • NOT NULL
  • anexo — text
  • data_criacao — datetime • NOT NULL
  • tipo — varchar(50)
  • canal — varchar(50)
  • status — varchar(50)
  • nota — varchar(50)
  • empresa_id — int
  • profissional_id — int
  • atendimento_pai — int

vw_parceiros_kpis

  • id_contrato — int
  • empresas — bigint
  • empresas_ativas — bigint
  • profissionais — bigint
  • profissionais_ativos — bigint

vw_parceiros_leads_crm

  • id — int unsigned • NOT NULL
  • nome — varchar(250)
  • email — varchar(100) • NOT NULL
  • whatsapp — varchar(50)
  • cpf — varchar(20)
  • cnpj — varchar(20)
  • origem_canal — varchar(50)
  • status — varchar(20)
  • owner_user_id — int
  • converted_user_id — int
  • score — tinyint unsigned • NOT NULL
  • next_action_at — datetime
  • last_activity_at — datetime
  • data_cadastro — datetime • NOT NULL

vw_perm_baseline_contrato

  • id_contrato — int • NOT NULL
  • kit — varchar(80) • NOT NULL
  • ns — varchar(190) • NOT NULL
  • effect — enum('allow','deny') • NOT NULL

vw_usuario_cliente_ativo

  • user_id — int • NOT NULL
  • cliente_ativo — int • NOT NULL

vw_usuario_equipes_str

  • user_id — int • NOT NULL
  • equipes_str — int • NOT NULL

vw_usuario_grupos_str

  • user_id — int • NOT NULL
  • grupos_str — int • NOT NULL

wpjy_actionscheduler_actions

  • action_id — bigint unsigned • NOT NULL • PRI
  • hook — varchar(191) • NOT NULL • MUL
  • status — varchar(20) • NOT NULL • MUL
  • scheduled_date_gmt — datetime • MUL
  • scheduled_date_local — datetime
  • args — varchar(191) • MUL
  • schedule — longtext
  • group_id — bigint unsigned • NOT NULL • MUL
  • attempts — int • NOT NULL
  • last_attempt_gmt — datetime • MUL
  • last_attempt_local — datetime
  • claim_id — bigint unsigned • NOT NULL • MUL
  • extended_args — varchar(8000)
  • priority — tinyint unsigned • NOT NULL

Índices

  • PRIMARY → action_id
  • hook → hook
  • status → status
  • scheduled_date_gmt → scheduled_date_gmt
  • args → args
  • group_id → group_id
  • last_attempt_gmt → last_attempt_gmt
  • claim_id_status_scheduled_date_gmt → claim_id, status, scheduled_date_gmt
  • hook_status_scheduled_date_gmt → hook, status, scheduled_date_gmt
  • status_scheduled_date_gmt → status, scheduled_date_gmt

wpjy_actionscheduler_claims

  • claim_id — bigint unsigned • NOT NULL • PRI
  • date_created_gmt — datetime • MUL

Índices

  • PRIMARY → claim_id
  • date_created_gmt → date_created_gmt

wpjy_actionscheduler_groups

  • group_id — bigint unsigned • NOT NULL • PRI
  • slug — varchar(255) • NOT NULL • MUL

Índices

  • PRIMARY → group_id
  • slug → slug

wpjy_actionscheduler_logs

  • log_id — bigint unsigned • NOT NULL • PRI
  • action_id — bigint unsigned • NOT NULL • MUL
  • message — text • NOT NULL
  • log_date_gmt — datetime • MUL
  • log_date_local — datetime

Índices

  • PRIMARY → log_id
  • action_id → action_id
  • log_date_gmt → log_date_gmt

wpjy_afl_comissoes

  • id — int • NOT NULL • PRI
  • user — int
  • tipo — varchar(50)
  • valor — float(10,2)
  • fatura — int
  • nivel — int
  • status — varchar(50)
  • pagamento — datetime
  • anexo — text
  • visita — int
  • data — datetime
  • obs — text
  • total — float(10,2)
  • comissao — float(10,2)
  • tipo_comissao — varchar(50)
  • cliente — int
  • data_pagamento — datetime

Índices

  • PRIMARY → id

wpjy_afl_materiais

  • id — int • NOT NULL • PRI
  • data — datetime
  • titulo — varchar(255)
  • descricao — text
  • contrato — int
  • status — varchar(50)
  • url — varchar(255)
  • media — text
  • tipo — varchar(50)
  • ordem — tinyint

Índices

  • PRIMARY → id

wpjy_afl_notificacoes

  • id — int • NOT NULL • PRI
  • assunto — varchar(50)
  • conteudo — text
  • acao — varchar(250)
  • para — int
  • criada — datetime
  • repetir — int
  • ntime — datetime
  • nloop — int

Índices

  • PRIMARY → id

wpjy_afl_transacoes

  • id — int • NOT NULL • PRI
  • criada — datetime
  • atualizada — datetime
  • user — int
  • tipo — varchar(50)
  • valor — float(10,2)
  • status — varchar(50)
  • anexo — text
  • comissao — int • UNI

Índices

  • PRIMARY → id
  • comissao → comissao

wpjy_afl_visitas

  • id — int • NOT NULL • PRI
  • ip — varchar(20)
  • user — int
  • url — varchar(255)
  • browser — varchar(50)
  • dispositivo — varchar(50)
  • data — datetime
  • status — varchar(50)
  • campanha — varchar(50)

Índices

  • PRIMARY → id

wpjy_agendamento_arquivos

  • id — bigint • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • agendamento_id — int • NOT NULL • MUL
  • order_id — bigint • MUL
  • invoice_id — bigint
  • user_id — bigint • NOT NULL
  • id_profissional — int • NOT NULL
  • item_type — enum('service','procedure','other') • NOT NULL • MUL
  • ref_id — bigint
  • label — varchar(255)
  • kind — enum('resultado','anexo','receita','laudo','imagem','outro') • NOT NULL
  • file_path — varchar(600) • NOT NULL
  • file_url — varchar(600)
  • mime — varchar(120)
  • size_bytes — bigint
  • observacoes — text
  • status — enum('ativo','oculto','excluido') • NOT NULL
  • created_at — datetime
  • updated_at — datetime

Índices

  • PRIMARY → id
  • idx_agd → agendamento_id, kind, status
  • idx_user → id_contrato, user_id, created_at
  • idx_prof → id_contrato, id_profissional, created_at
  • idx_order → order_id
  • idx_item → item_type, ref_id

wpjy_api_logs

  • id — int unsigned • NOT NULL • PRI
  • data — datetime • NOT NULL
  • ip — varchar(45) • NOT NULL
  • rota — varchar(255) • NOT NULL
  • metodo — varchar(10) • NOT NULL
  • parametros — text
  • status — varchar(20) • NOT NULL
  • mensagem — text
  • contrato — int • NOT NULL

Índices

  • PRIMARY → id

wpjy_app_audit_log

  • id — int • NOT NULL • PRI
  • area — varchar(40) • NOT NULL
  • action — varchar(80) • NOT NULL
  • meta_json — json
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id

wpjy_app_commission_ledger

  • id — int • NOT NULL • PRI
  • order_id — int • NOT NULL • MUL
  • payee_type — varchar(20) • NOT NULL • MUL
  • payee_id — int • NOT NULL
  • amount — decimal(12,2) • NOT NULL
  • status — varchar(20) • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_payee → payee_type, payee_id
  • idx_order → order_id

wpjy_app_commission_schemes

  • id — int • NOT NULL • PRI
  • key — varchar(60) • NOT NULL • UNI
  • label — varchar(120) • NOT NULL
  • rules_json — json

Índices

  • PRIMARY → id
  • key → key

wpjy_app_invoices

  • id — int • NOT NULL • PRI
  • order_id — int • NOT NULL • MUL
  • amount — decimal(12,2) • NOT NULL
  • currency — char(3) • NOT NULL
  • provider — varchar(40) • NOT NULL
  • method — varchar(20) • NOT NULL
  • status — varchar(20) • NOT NULL
  • provider_ref — varchar(100)
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • fk_order → order_id

wpjy_app_notification_channels

  • id — bigint unsigned • NOT NULL • PRI
  • notification_id — bigint unsigned • NOT NULL • MUL
  • channel — varchar(20) • NOT NULL
  • status — varchar(20) • NOT NULL
  • error_message — text
  • sent_at — datetime
  • created_at — datetime • NOT NULL
  • updated_at — datetime

Índices

  • PRIMARY → id
  • idx_notification → notification_id, channel

wpjy_app_notification_prefs

  • id — bigint unsigned • NOT NULL • PRI
  • user_id — bigint unsigned • NOT NULL • MUL
  • type — varchar(100) • NOT NULL
  • channel — varchar(20) • NOT NULL
  • enabled — tinyint(1) • NOT NULL
  • created_at — datetime • NOT NULL
  • updated_at — datetime

Índices

  • PRIMARY → id
  • uk_user_type_channel → user_id, type, channel
  • idx_user → user_id

wpjy_app_notifications

  • id — bigint unsigned • NOT NULL • PRI
  • id_contrato — bigint unsigned • MUL
  • user_id — bigint unsigned • NOT NULL • MUL
  • area — varchar(20) • NOT NULL
  • type — varchar(100) • NOT NULL
  • title — varchar(255) • NOT NULL
  • message — text • NOT NULL
  • link — varchar(500)
  • data — json
  • is_read — tinyint(1) • NOT NULL
  • read_at — datetime
  • created_at — datetime • NOT NULL
  • updated_at — datetime

Índices

  • PRIMARY → id
  • idx_user_read_created → user_id, is_read, created_at
  • idx_user_created → user_id, created_at
  • idx_contrato → id_contrato

wpjy_app_order_items

  • id — int • NOT NULL • PRI
  • order_id — int • NOT NULL • MUL
  • sku — varchar(80)
  • title — varchar(255)
  • qty — int • NOT NULL
  • unit_price — decimal(12,2) • NOT NULL
  • total — decimal(12,2) • NOT NULL
  • meta_json — json

Índices

  • PRIMARY → id
  • fk_order → order_id

wpjy_app_orders

  • id — int • NOT NULL • PRI
  • buyer_id — int • NOT NULL
  • buyer_type — varchar(20) • NOT NULL • MUL
  • currency — char(3) • NOT NULL
  • amount — decimal(12,2) • NOT NULL
  • status — varchar(20) • NOT NULL
  • meta_json — json
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_buyer → buyer_type, buyer_id

wpjy_app_payout_items

  • id — int • NOT NULL • PRI
  • payout_id — int • NOT NULL • MUL
  • ledger_id — int • NOT NULL • MUL

Índices

  • PRIMARY → id
  • fk_payout → payout_id
  • fk_ledger → ledger_id

wpjy_app_payouts

  • id — int • NOT NULL • PRI
  • payee_type — varchar(20) • NOT NULL • MUL
  • payee_id — int • NOT NULL
  • amount — decimal(12,2) • NOT NULL
  • status — varchar(20) • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_payee → payee_type, payee_id

wpjy_assinatura_planos

  • id — int • NOT NULL • PRI
  • assinatura_id — int • NOT NULL • MUL
  • plano_id — int • NOT NULL • MUL
  • data_inicio — date
  • data_fim — date

Índices

  • PRIMARY → id
  • assinatura_id → assinatura_id, plano_id
  • unique_assinatura_plano → assinatura_id, plano_id
  • plano_id → plano_id

wpjy_assinaturas

  • id — int • NOT NULL • PRI
  • user_id — bigint unsigned • NOT NULL • MUL
  • id_contrato_plano — int • NOT NULL • MUL
  • plano_periodo — varchar(50)
  • id_gateway — varchar(45) • MUL
  • id_gateway_cliente — varchar(25)
  • gateway_tipo — varchar(50) • NOT NULL
  • status — varchar(1) • MUL
  • dia_vencimento — int
  • data_inicio — datetime
  • data_atualizacao — datetime
  • data_inativo — datetime
  • data_fim — datetime • MUL
  • data_expira — date
  • tipo — varchar(20)
  • isento — tinyint
  • auto_cobranca — tinyint
  • hash — varchar(250)
  • id_indicador — int • MUL
  • visita — int
  • id_vendedor — int • MUL
  • origem — varchar(20)
  • cc_token — text
  • cupom — int
  • cupom_total — decimal(10,2)
  • cupom_valor — decimal(10,2)
  • cupom_mensalidades — tinyint(1)
  • valor_original — decimal(10,2)
  • valor_reajuste — decimal(10,2)
  • taxa — decimal(10,2)
  • moeda — varchar(10)
  • reajuste — tinyint(1)
  • desconto — varchar(10)

Índices

  • PRIMARY → id
  • id_contrato_plano → id_contrato_plano
  • id_gateway → id_gateway
  • user_id → user_id
  • id_vendedor → id_vendedor
  • id_indicador → id_indicador
  • idx_assinaturas_user_status → user_id, status
  • idx_assinaturas_status → status
  • idx_assinaturas_data_fim → data_fim
  • idx_user_status → user_id, status

wpjy_atendimentos

  • id — int • NOT NULL • PRI
  • user_id — int • MUL
  • lead_id — int • MUL
  • assunto — varchar(150)
  • texto — text • NOT NULL
  • anexo — text
  • data_criacao — datetime • NOT NULL
  • usuario — int • NOT NULL • MUL
  • tipo — varchar(50)
  • meio — varchar(50)
  • atendimento_pai — int
  • status — varchar(50)
  • nota — varchar(50)
  • empresa_id — int • MUL
  • profissional_id — int • MUL

Índices

  • PRIMARY → id
  • user_id → user_id
  • usuario → usuario
  • lead_id → lead_id
  • empresa_id → empresa_id
  • profissional_id → profissional_id

wpjy_audit_diff

  • id — bigint unsigned • NOT NULL • PRI
  • event_id — bigint unsigned • NOT NULL • MUL
  • field — varchar(191) • NOT NULL
  • old_value — longtext
  • new_value — longtext
  • change_json — longtext

Índices

  • PRIMARY → id
  • idx_event → event_id

wpjy_audit_event

  • id — bigint unsigned • NOT NULL • PRI
  • request_id — char(36) • NOT NULL • MUL
  • happened_at — datetime • NOT NULL
  • actor_user_id — bigint unsigned
  • action — varchar(64) • NOT NULL • MUL
  • table_name — varchar(128) • MUL
  • record_id — bigint
  • message — text
  • severity — tinyint
  • ip — varchar(45)
  • user_agent — varchar(255)
  • url — text
  • contrato_id — bigint unsigned
  • meta_json — longtext

Índices

  • PRIMARY → id
  • idx_req → request_id, happened_at
  • idx_tbl_rec → table_name, record_id
  • idx_action_time → action, happened_at

wpjy_audit_request

  • id — bigint unsigned • NOT NULL • PRI
  • request_id — char(36) • NOT NULL • UNI
  • started_at — datetime • NOT NULL
  • ended_at — datetime
  • status_code — int
  • user_id — bigint unsigned • MUL
  • session_id — varchar(128)
  • contrato_id — bigint unsigned
  • method — varchar(10)
  • url — text
  • referer — text
  • ip — varchar(45)
  • user_agent — varchar(255)
  • app_version — varchar(32)
  • extra_json — longtext

Índices

  • PRIMARY → id
  • uq_request_id → request_id
  • idx_user_started → user_id, started_at

wpjy_avisos

  • id — int • NOT NULL • PRI
  • titulo — varchar(255) • NOT NULL
  • mensagem — text • NOT NULL
  • status — varchar(20) • NOT NULL
  • data_publicacao — datetime
  • data_expiracao — datetime
  • contrato — int • MUL

Índices

  • PRIMARY → id
  • contrato → contrato

wpjy_beneficiarios

  • id — int • NOT NULL • PRI
  • nome — varchar(255) • NOT NULL
  • data_nascimento — date • NOT NULL
  • cpf — varchar(14) • NOT NULL
  • parentesco — varchar(255)
  • percentual — decimal(5,2) • NOT NULL
  • user_id — int • NOT NULL • MUL
  • data_cadastro — timestamp • NOT NULL

Índices

  • PRIMARY → id
  • user_id → user_id

wpjy_beneficios_planos

  • id — int • NOT NULL • PRI
  • id_beneficio — int • NOT NULL • MUL
  • id_contrato_plano — int • NOT NULL • MUL

Índices

  • PRIMARY → id
  • id_beneficio → id_beneficio
  • id_contrat_plano → id_contrato_plano

wpjy_booking_holds

  • id — bigint • NOT NULL • PRI
  • prof_id — int • NOT NULL • MUL
  • user_id — int • NOT NULL
  • data — date • NOT NULL
  • inicio — time • NOT NULL
  • fim — time • NOT NULL
  • expires_at — datetime • NOT NULL • MUL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_hold → prof_id, data, inicio, fim
  • ix_hold_prof_user → prof_id, user_id
  • ix_hold_exp → expires_at
  • idx_booking_holds_gc → expires_at

wpjy_bunny_stream_config

  • id — tinyint unsigned • NOT NULL • PRI
  • enabled — tinyint(1) • NOT NULL
  • library_id — int unsigned
  • api_key — text
  • cdn_base_url — varchar(255)
  • pull_zone_name — varchar(120)
  • created_at — datetime • NOT NULL
  • updated_at — datetime

Índices

  • PRIMARY → id

wpjy_carne_impresso

  • id — int • NOT NULL • PRI
  • id_assinatura — int • NOT NULL • UNI
  • data_criacao — datetime • NOT NULL

Índices

  • PRIMARY → id
  • id_assinatura → id_assinatura

wpjy_categorias_telas

  • id — int • NOT NULL • PRI
  • nome — varchar(255)
  • cor — varchar(30)

Índices

  • PRIMARY → id

wpjy_cfg_contexts

  • id — bigint unsigned • NOT NULL • PRI
  • slug — varchar(64) • NOT NULL • UNI
  • label — varchar(120) • NOT NULL
  • icon — varchar(64)
  • enabled — tinyint(1) • NOT NULL • MUL
  • sort_order — int unsigned • NOT NULL

Índices

  • PRIMARY → id
  • uq_cfg_ctx_slug → slug
  • idx_cfg_ctx_ord → enabled, sort_order

wpjy_cfg_feature_flags

  • id — bigint unsigned • NOT NULL • PRI
  • module_id — bigint unsigned • NOT NULL • MUL
  • slug — varchar(120) • NOT NULL
  • label — varchar(160) • NOT NULL
  • description — varchar(400)
  • enabled_default — tinyint(1) • NOT NULL
  • rollout_percent — tinyint • NOT NULL
  • target_roles — json
  • target_users — json
  • target_contratos — json
  • created_at — datetime • NOT NULL
  • updated_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_cfg_flag_slug → module_id, slug

wpjy_cfg_groups

  • id — bigint unsigned • NOT NULL • PRI
  • module_id — bigint unsigned • NOT NULL • MUL
  • slug — varchar(64) • NOT NULL
  • name — varchar(120) • NOT NULL
  • icon — varchar(64)
  • sort_order — int unsigned • NOT NULL
  • created_at — datetime • NOT NULL
  • updated_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_cfg_group → module_id, slug
  • idx_group_ord → module_id, sort_order

wpjy_cfg_integrations

  • id — bigint unsigned • NOT NULL • PRI
  • module_id — bigint unsigned • NOT NULL • MUL
  • slug — varchar(80) • NOT NULL
  • name — varchar(160) • NOT NULL
  • base_url — varchar(500)
  • token — varchar(500)
  • secret — varchar(500)
  • config_json — json
  • enabled — tinyint(1) • NOT NULL
  • created_at — datetime • NOT NULL
  • updated_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_cfg_int_slug → module_id, slug

wpjy_cfg_modules

  • id — bigint unsigned • NOT NULL • PRI
  • slug — varchar(64) • NOT NULL • UNI
  • name — varchar(120) • NOT NULL
  • icon — varchar(64)
  • sort_order — int unsigned • NOT NULL
  • enabled — tinyint(1) • NOT NULL • MUL
  • created_at — datetime • NOT NULL
  • updated_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_cfg_mod_slug → slug
  • idx_mod_enabled → enabled, sort_order

wpjy_cfg_playbook

  • id — bigint unsigned • NOT NULL • PRI
  • module_id — bigint unsigned • NOT NULL • MUL
  • slug — varchar(120) • NOT NULL
  • title — varchar(200) • NOT NULL
  • content_md — mediumtext
  • tags — varchar(200)
  • sort_order — int unsigned • NOT NULL

Índices

  • PRIMARY → id
  • uq_cfg_playbook_slug → module_id, slug

wpjy_cfg_rules

  • id — bigint unsigned • NOT NULL • PRI
  • module_id — bigint unsigned • NOT NULL • MUL
  • slug — varchar(120) • NOT NULL
  • event — varchar(120) • NOT NULL
  • condition_expr — varchar(500)
  • action_key — varchar(120) • NOT NULL
  • params_json — json
  • enabled — tinyint(1) • NOT NULL
  • sort_order — int unsigned • NOT NULL
  • created_at — datetime • NOT NULL
  • updated_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_cfg_rule_slug → module_id, slug
  • idx_cfg_rule_evt → module_id, event, enabled

wpjy_cfg_tabs

  • id — bigint unsigned • NOT NULL • PRI
  • group_id — bigint unsigned • NOT NULL • MUL
  • slug — varchar(64) • NOT NULL
  • name — varchar(120) • NOT NULL
  • icon — varchar(64)
  • sort_order — int unsigned • NOT NULL
  • created_at — datetime • NOT NULL
  • updated_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_cfg_tab → group_id, slug
  • idx_tab_ord → group_id, sort_order

wpjy_chat_attachments

  • id — int • NOT NULL • PRI
  • message_id — int • NOT NULL • MUL
  • file_url — varchar(255) • NOT NULL
  • file_name — varchar(255) • NOT NULL
  • file_size — bigint
  • mime_type — varchar(100) • MUL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_message → message_id
  • idx_message_created → message_id, created_at
  • idx_mime → mime_type

wpjy_chat_messages

  • id — int • NOT NULL • PRI
  • thread_id — int • NOT NULL • MUL
  • sender_tipo — enum('profissional','empresa','admin','cliente') • NOT NULL
  • sender_id — int • NOT NULL
  • body — text
  • meta_json — json
  • created_at — datetime • NOT NULL • MUL

Índices

  • PRIMARY → id
  • idx_thread → thread_id
  • idx_thread_created → thread_id, created_at
  • idx_thread_id_created → thread_id, id
  • idx_created → created_at
  • idx_chat_msg_thread_id → thread_id, id

wpjy_chat_participants

  • id — int • NOT NULL • PRI
  • thread_id — int • NOT NULL • MUL
  • parceiro_tipo — enum('profissional','empresa','cliente') • NOT NULL
  • parceiro_id — int • NOT NULL
  • user_id — bigint
  • joined_at — datetime • NOT NULL
  • unseen_count — int • NOT NULL

Índices

  • PRIMARY → id
  • uq_thread_actor → thread_id, parceiro_tipo, parceiro_id
  • uq_thread_user → thread_id, user_id
  • idx_thread → thread_id
  • idx_thread_user → thread_id, user_id
  • idx_chat_part_thread_user → thread_id, user_id
  • idx_chat_part_thread_parc → thread_id, parceiro_tipo, parceiro_id

wpjy_chat_threads

  • id — int • NOT NULL • PRI
  • created_at — datetime • NOT NULL
  • updated_at — datetime • NOT NULL
  • is_group — tinyint(1) • NOT NULL
  • name — varchar(255)
  • last_message_at — datetime • MUL

Índices

  • PRIMARY → id
  • idx_chat_threads_last → last_message_at

wpjy_cliente_medicamentos

  • id — bigint unsigned • NOT NULL • PRI
  • user_id — bigint unsigned • NOT NULL • MUL
  • nome — varchar(190) • NOT NULL
  • dosagem — varchar(100)
  • frequencia — varchar(120)
  • via — varchar(50)
  • motivo — varchar(255)
  • prescrito_por — varchar(190)
  • desde — date
  • ate — date
  • em_uso — tinyint(1) • NOT NULL
  • uso_sob_demanda — tinyint(1) • NOT NULL
  • controlado — tinyint(1) • NOT NULL
  • origem — enum('cliente','profissional') • NOT NULL
  • observacoes — text
  • created_at — datetime • NOT NULL
  • updated_at — datetime

Índices

  • PRIMARY → id
  • idx_user_uso → user_id, em_uso
  • idx_user_uso_ctrl → user_id, em_uso, controlado

wpjy_cliente_medidas_basicas

  • id — bigint unsigned • NOT NULL • PRI
  • user_id — bigint unsigned • NOT NULL • UNI
  • peso_kg — decimal(5,2)
  • altura_cm — decimal(5,2)
  • imc — decimal(5,2)
  • pa_sistolica — smallint
  • pa_diastolica — smallint
  • circunferencia_abdominal_cm — decimal(5,1)
  • created_at — datetime • NOT NULL
  • updated_at — datetime

Índices

  • PRIMARY → id
  • uq_user → user_id

wpjy_cliente_perfil_saude

  • id — bigint unsigned • NOT NULL • PRI
  • user_id — bigint unsigned • NOT NULL • UNI
  • possui_doenca_diagnosticada — tinyint(1) • NOT NULL
  • realizou_cirurgias — tinyint(1) • NOT NULL
  • alergia_alimento — tinyint(1) • NOT NULL
  • alergia_medicamento — tinyint(1) • NOT NULL
  • foi_internado — tinyint(1) • NOT NULL
  • reacao_anestesia — tinyint(1) • NOT NULL
  • familia_doencas — tinyint(1) • NOT NULL
  • familia_morte_subita — tinyint(1) • NOT NULL
  • familia_doenca_genetica — tinyint(1) • NOT NULL
  • familia_doenca_genetica_desc — varchar(255)
  • pratica_atividade_fisica — tinyint(1) • NOT NULL
  • condicoes — text
  • alergias — text
  • cirurgias_internacoes — text
  • historico_familiar — text
  • habitos_vida — text
  • queixa_principal — text
  • historia_doenca_atual — text
  • objetivos_saude — text
  • observacoes — text
  • created_at — datetime • NOT NULL
  • updated_at — datetime
  • tipo_sanguineo — enum('A+','A-','B+','B-','AB+','AB-','O+','O-','NI')
  • plano_saude_plano_id — int
  • plano_saude_convenio_nome — varchar(190)
  • plano_saude_plano_nome — varchar(190)
  • plano_saude_numero — varchar(80)
  • tem_diabetes — tinyint(1) • NOT NULL
  • tem_hipertensao — tinyint(1) • NOT NULL
  • tem_cardiopatia — tinyint(1) • NOT NULL
  • fumante — tinyint(1) • NOT NULL
  • consome_alcool — tinyint(1) • NOT NULL
  • gestante — tinyint(1) • NOT NULL
  • usa_medicacao_continua — tinyint(1) • NOT NULL
  • medicacao_continua_resumo — varchar(255)
  • objetivos_saude_tags — json
  • habitos_vida_tags — json
  • observacoes_tags — json

Índices

  • PRIMARY → id
  • uq_user → user_id

wpjy_cliente_suplementos

  • id — bigint unsigned • NOT NULL • PRI
  • user_id — bigint unsigned • NOT NULL • MUL
  • nome — varchar(190) • NOT NULL
  • frequencia — varchar(120)
  • indicado_por — varchar(190)
  • objetivo — varchar(255)
  • tempo_uso — varchar(120)
  • teve_efeito_colateral — tinyint(1) • NOT NULL
  • efeito_colateral_desc — varchar(255)
  • desde — date
  • created_at — datetime • NOT NULL
  • updated_at — datetime

Índices

  • PRIMARY → id
  • idx_user → user_id
  • idx_user_since → user_id, desde

wpjy_cnae_classes

  • id — char(5) • NOT NULL • PRI
  • descricao — text • NOT NULL
  • grupo_id — char(2) • NOT NULL • MUL
  • divisao_id — char(2) • NOT NULL • MUL
  • secao_id — char(1) • NOT NULL • MUL

Índices

  • PRIMARY → id
  • grupo_id → grupo_id
  • divisao_id → divisao_id
  • secao_id → secao_id

wpjy_cnae_divisoes

  • id — char(2) • NOT NULL • PRI
  • descricao — text • NOT NULL
  • secao_id — char(1) • NOT NULL • MUL

Índices

  • PRIMARY → id
  • secao_id → secao_id

wpjy_cnae_grupos

  • id — char(2) • NOT NULL • PRI
  • descricao — text • NOT NULL
  • divisao_id — char(2) • NOT NULL • MUL
  • secao_id — char(1) • NOT NULL • MUL

Índices

  • PRIMARY → id
  • divisao_id → divisao_id
  • secao_id → secao_id

wpjy_cnae_secoes

  • id — char(1) • NOT NULL • PRI
  • descricao — text • NOT NULL

Índices

  • PRIMARY → id

wpjy_cnae_subclasses

  • id — char(7) • NOT NULL • PRI
  • descricao — text • NOT NULL
  • classe_id — char(5) • NOT NULL • MUL
  • grupo_id — char(2) • NOT NULL • MUL
  • divisao_id — char(2) • NOT NULL • MUL
  • secao_id — char(1) • NOT NULL • MUL

Índices

  • PRIMARY → id
  • classe_id → classe_id
  • grupo_id → grupo_id
  • divisao_id → divisao_id
  • secao_id → secao_id

wpjy_cnae_temp

  • subclasse_id — char(7)
  • subclasse_descricao — text
  • classe_id — char(5)
  • classe_descricao — text
  • grupo_id — char(2)
  • grupo_descricao — text
  • divisao_id — char(2)
  • divisao_descricao — text
  • secao_id — char(1)
  • secao_descricao — text

wpjy_comissoes

  • id — int • NOT NULL • PRI
  • id_promotor — int • MUL
  • valor — decimal(10,2)
  • porcentagem — decimal(10,2)
  • dataini — date
  • datafim — date
  • datapago — datetime
  • anexo — text
  • tipo — varchar(1) • NOT NULL
  • id_fatura — int

Índices

  • PRIMARY → id
  • user_id → id_promotor

wpjy_comissoes_vendedor

  • id — int • NOT NULL • PRI
  • id_vendedor — int • MUL
  • id_fatura — int • MUL
  • valor — decimal(10,2)
  • porcentagem — decimal(10,2)
  • dataini — date
  • datafim — date
  • datapago — datetime
  • anexo — text

Índices

  • PRIMARY → id
  • id_vendedor → id_vendedor
  • id_fatura → id_fatura

wpjy_comm_balances

  • id — bigint • NOT NULL • PRI
  • ref_tipo — varchar(32) • NOT NULL • MUL
  • ref_id — bigint • NOT NULL
  • available — decimal(14,2) • NOT NULL
  • on_hold — decimal(14,2) • NOT NULL
  • updated_at — timestamp

Índices

  • PRIMARY → id
  • uq_receiver → ref_tipo, ref_id

wpjy_comm_entries

  • id — bigint • NOT NULL • PRI
  • event_id — bigint • NOT NULL • MUL
  • role_slug — varchar(64) • NOT NULL
  • ref_tipo — varchar(32) • NOT NULL • MUL
  • ref_id — bigint • NOT NULL
  • amount — decimal(14,2) • NOT NULL
  • status — enum('pending','approved','paid','reversed') • NOT NULL • MUL
  • note — varchar(255)
  • created_at — timestamp

Índices

  • PRIMARY → id
  • idx_event → event_id
  • idx_receiver → ref_tipo, ref_id
  • idx_status → status
  • idx_comm_entries_ref_status → ref_tipo, ref_id, status

wpjy_comm_events

  • id — bigint • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • payment_id — bigint • UNI
  • subscription_id — bigint • MUL
  • n_eff — int
  • amount_base — decimal(14,2) • NOT NULL
  • pool_amount — decimal(14,2)
  • pool_pct — decimal(6,4)
  • scheme_id — bigint • MUL
  • fired_at — datetime
  • meta — json
  • created_at — timestamp

Índices

  • PRIMARY → id
  • uq_comm_event_payment → payment_id
  • idx_payment → payment_id
  • idx_scheme → scheme_id
  • idx_contract → id_contrato
  • idx_comm_event_subscription → subscription_id

wpjy_comm_network_assignment

  • id — bigint • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • target_context — varchar(32)
  • ref_tipo — varchar(32) • NOT NULL • MUL
  • ref_id — bigint • NOT NULL
  • role_slug — varchar(64) • NOT NULL
  • receiver_tipo — varchar(32) • NOT NULL • MUL
  • receiver_id — bigint • NOT NULL
  • created_at — timestamp

Índices

  • PRIMARY → id
  • idx_target → ref_tipo, ref_id
  • idx_receiver → receiver_tipo, receiver_id
  • idx_contrato → id_contrato
  • idx_contrato_role → id_contrato, role_slug

wpjy_comm_network_snapshot

  • id — bigint • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • context — varchar(64) • MUL
  • ref_tipo — varchar(32) • NOT NULL
  • ref_id — bigint • NOT NULL
  • snapshot_json — json • NOT NULL
  • created_at — timestamp

Índices

  • PRIMARY → id
  • uq_context_ref → context, ref_tipo, ref_id
  • idx_snapshot_contrato → id_contrato

wpjy_comm_payout_batches

  • id — bigint • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • period — varchar(32)
  • total — decimal(14,2) • NOT NULL
  • status — enum('draft','processing','paid','failed') • NOT NULL • MUL
  • created_at — timestamp

Índices

  • PRIMARY → id
  • idx_contract → id_contrato
  • idx_status → status

wpjy_comm_payout_items

  • id — bigint • NOT NULL • PRI
  • batch_id — bigint • NOT NULL • MUL
  • entry_id — bigint • NOT NULL • MUL
  • receiver_tipo — varchar(32) • NOT NULL
  • receiver_id — bigint • NOT NULL
  • amount — decimal(14,2) • NOT NULL
  • fees — decimal(14,2)
  • pix_key — varchar(191)
  • comprovante_url — varchar(255)
  • status — enum('pending','paid','failed') • NOT NULL
  • created_at — timestamp

Índices

  • PRIMARY → id
  • idx_batch → batch_id
  • idx_entry → entry_id

wpjy_comm_schemes

  • id — bigint • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • plan_slug — varchar(64) • MUL
  • context — varchar(64)
  • rule_json — json • NOT NULL
  • version — int • NOT NULL
  • status — enum('draft','active','archived') • NOT NULL • MUL
  • valid_from — date
  • valid_to — date
  • created_at — timestamp

Índices

  • PRIMARY → id
  • idx_contract → id_contrato
  • idx_status → status
  • idx_schemes_plan_status → plan_slug, status
  • idx_comm_schemes_list → id_contrato, status, id

wpjy_commentmeta

  • meta_id — bigint unsigned • NOT NULL • PRI
  • comment_id — bigint unsigned • NOT NULL • MUL
  • meta_key — varchar(255) • MUL
  • meta_value — longtext

Índices

  • PRIMARY → meta_id
  • comment_id → comment_id
  • meta_key → meta_key

wpjy_comments

  • comment_ID — bigint unsigned • NOT NULL • PRI
  • comment_post_ID — bigint unsigned • NOT NULL • MUL
  • comment_author — tinytext • NOT NULL
  • comment_author_email — varchar(100) • NOT NULL • MUL
  • comment_author_url — varchar(200) • NOT NULL
  • comment_author_IP — varchar(100) • NOT NULL
  • comment_date — datetime • NOT NULL
  • comment_date_gmt — datetime • NOT NULL • MUL
  • comment_content — text • NOT NULL
  • comment_karma — int • NOT NULL
  • comment_approved — varchar(20) • NOT NULL • MUL
  • comment_agent — varchar(255) • NOT NULL
  • comment_type — varchar(20) • NOT NULL
  • comment_parent — bigint unsigned • NOT NULL • MUL
  • user_id — bigint unsigned • NOT NULL

Índices

  • PRIMARY → comment_ID
  • comment_post_ID → comment_post_ID
  • comment_approved_date_gmt → comment_approved, comment_date_gmt
  • comment_date_gmt → comment_date_gmt
  • comment_parent → comment_parent
  • comment_author_email → comment_author_email

wpjy_configuracoes

  • id — int • NOT NULL • PRI
  • chave — varchar(255) • NOT NULL • UNI
  • titulo — varchar(255) • NOT NULL
  • tipo_campo — varchar(255) • NOT NULL
  • descricao — text
  • opcoes — text
  • categoria — varchar(255)

Índices

  • PRIMARY → id
  • chave → chave

wpjy_configuracoes_valores

  • id — int • NOT NULL • PRI
  • configuracao — int • NOT NULL • MUL
  • valor — text

Índices

  • PRIMARY → id
  • configuracao → configuracao

wpjy_contrato_permissao

  • id — int • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • id_permissao — int • NOT NULL

Índices

  • PRIMARY → id
  • id_contrato → id_contrato, id_permissao

wpjy_contratos

  • id — int • NOT NULL • PRI
  • contrato_pai — int • MUL
  • nome — varchar(100)
  • nome_fantasia — varchar(100) • MUL
  • slug — varchar(50)
  • tipo — varchar(100)
  • email — varchar(100)
  • cnpj — varchar(20)
  • cep — varchar(8)
  • logradouro — varchar(250)
  • numero — varchar(10)
  • complemento — varchar(20)
  • bairro — varchar(45)
  • cidade — varchar(45)
  • uf — varchar(2)
  • responsavel — varchar(100)
  • responsavel_contato — varchar(25)
  • responsavel_email — varchar(100)
  • site — text
  • logo — text
  • logo_claro — mediumtext
  • data_assinatura — datetime
  • data_inicio — datetime
  • objeto_contrato_inicio — text
  • data_fim — datetime
  • objeto_contrato_fim — text
  • contrato — varchar(45)
  • gateway — int • MUL
  • gateway_cc — int • MUL
  • gateway_corp — int • MUL
  • campo_adicional — varchar(80)
  • campo_adicional_login — tinyint
  • campo_adicional_obrigatorio — tinyint
  • termos_uso — mediumtext
  • politica_privacidade — mediumtext
  • politica_cancelamento — mediumtext
  • condicoes_gerais — mediumtext
  • termos_divulgacao — mediumtext
  • manual — mediumtext
  • twitter — text
  • facebook — text
  • instagram — text
  • linkedin — text
  • youtube — text
  • clube_vantagens — mediumtext
  • carnet — tinyint • NOT NULL
  • lixeira — tinyint • MUL
  • telefonewhatsapp — text • NOT NULL
  • atendewhatsapp — text
  • api_key — text
  • pc_key — text
  • wallet_id — text
  • sandbox — tinyint(1)
  • sandbox_api_key — text
  • split — tinyint
  • metodos_pagamento — varchar(100)
  • favicon — varchar(100)
  • admin_css — varchar(20)
  • admin_header_class — varchar(100)
  • admin_menu_icon_class — varchar(100)
  • admin_sidebar_class — varchar(100)
  • admin_cor_fundo — varchar(20)
  • admin_cor_fundo_login — varchar(20)
  • admin_cor_header — varchar(20)
  • admin_cor_header_link — varchar(20)
  • admin_cor_sidebar — varchar(20)
  • admin_cor_sidebar_link — varchar(20)
  • admin_cor_sidebar_hover — varchar(20)
  • admin_cor_container — varchar(20)
  • admin_cor_titulo — varchar(20)
  • admin_cor_rodape — varchar(20)
  • admin_cor_rodape_texto — varchar(20)
  • admin_cor_rodape_link — varchar(20)
  • conta_gateway — varchar(255)
  • comissao_afiliado_adesao — float(10,2)
  • comissao_afiliado_adesao_asc — float(10,2)
  • comissao_modalidade — varchar(50)
  • comissao_afiliado_tipo — varchar(50)
  • comissao_afiliado_n1 — float(10,2)
  • comissao_afiliado_n2 — float(10,2)
  • comissao_afiliado_n3 — float(10,2)
  • comissao_afiliado_n4 — float(10,2)
  • saque_minimo — int
  • smtp_host — varchar(50)
  • smtp_port — varchar(50)
  • smtp_user — varchar(50)
  • smtp_pass — varchar(50)
  • smtp_auth — tinyint(1)
  • representante — int
  • app_google — mediumtext
  • app_apple — mediumtext
  • app_download — mediumtext
  • split_1_wallet — varchar(255)
  • split_1_valor — decimal(10,2)
  • split_1_tipo — varchar(20)
  • split_2_wallet — varchar(255)
  • split_2_valor — decimal(10,2)
  • split_2_tipo — varchar(20)
  • split_3_wallet — varchar(255)
  • split_3_valor — decimal(10,2)
  • split_3_tipo — varchar(20)
  • split_4_wallet — varchar(255)
  • split_4_valor — decimal(10,2)
  • split_4_tipo — varchar(20)
  • desconto_valor — decimal(10,2)
  • desconto_dias — tinyint
  • desconto_tipo — varchar(50)
  • juros_valor — decimal(10,2)
  • juros_tipo — varchar(50)
  • multa_valor — decimal(10,2)
  • faturamento — decimal(10,2)
  • multa_tipo — varchar(50)
  • webhook_url — varchar(250)
  • webhook_ativar — tinyint(1)
  • taxas_adesao — tinyint(1)
  • permitir_vencimento — tinyint(1)
  • leads_espera — tinyint(1)
  • equipes — tinyint(1)
  • zapi_instance — varchar(100)
  • zapi_token — varchar(100)
  • zapi_client_token — varchar(100)
  • zapi_ativo — tinyint(1)
  • admin_cor_sidebar_heading — varchar(20)

Índices

  • PRIMARY → id
  • gateway → gateway
  • gateway_cc → gateway_cc
  • gateway_corp → gateway_corp
  • idx_contratos_lixeira → lixeira
  • idx_contratos_nome → nome_fantasia
  • idx_contratos_pai_tipo → contrato_pai, tipo

wpjy_contratos_assinaturas

  • id — int • NOT NULL • PRI
  • contrato_id — int • NOT NULL • MUL
  • entidade — enum('profissional','empresa','usuario') • NOT NULL
  • entidade_id — int • NOT NULL
  • user_id — int
  • assinatura_base64 — longtext
  • ip — varchar(45)
  • versao — int • NOT NULL
  • assinado_em — datetime

Índices

  • PRIMARY → id
  • contrato_id → contrato_id, entidade, entidade_id

wpjy_contratos_bunny

  • id_contrato — int • NOT NULL • PRI
  • enabled — tinyint(1) • NOT NULL • MUL
  • storage_zone — varchar(100)
  • region — varchar(50)
  • access_key — text
  • cdn_base_url — varchar(255)
  • created_at — datetime • NOT NULL
  • updated_at — datetime

Índices

  • PRIMARY → id_contrato
  • idx_enabled → enabled

wpjy_contratos_dados

  • id — int • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • categoria_id — int • NOT NULL • MUL
  • valor — longtext
  • updated_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_contrato_categoria → id_contrato, categoria_id
  • idx_contrato → id_contrato
  • idx_categoria → categoria_id

wpjy_contratos_dados_categorias

  • id — int • NOT NULL • PRI
  • id_contrato_base — int • NOT NULL • MUL
  • tipo_contrato — varchar(100) • NOT NULL
  • grupo_id — int • MUL
  • slug — varchar(100) • NOT NULL
  • nome — varchar(100) • NOT NULL
  • tipo — enum('boolean','text','number','enum','json') • NOT NULL
  • opcoes — text
  • condicoes_json — json
  • ordem — int • NOT NULL
  • ativo — tinyint(1) • NOT NULL
  • created_at — datetime • NOT NULL
  • updated_at — datetime

Índices

  • PRIMARY → id
  • uq_base_tipo_slug → id_contrato_base, tipo_contrato, slug
  • idx_base_tipo → id_contrato_base, tipo_contrato, ativo, ordem
  • idx_grupo → grupo_id

wpjy_contratos_dados_grupos

  • id — int • NOT NULL • PRI
  • id_contrato_base — int • NOT NULL • MUL
  • tipo_contrato — varchar(100) • NOT NULL
  • nome — varchar(100) • NOT NULL
  • slug — varchar(100) • NOT NULL
  • ordem — int • NOT NULL
  • ativo — tinyint(1) • NOT NULL
  • created_at — datetime • NOT NULL
  • updated_at — datetime

Índices

  • PRIMARY → id
  • uq_base_tipo_slug → id_contrato_base, tipo_contrato, slug
  • idx_base_tipo → id_contrato_base, tipo_contrato, ativo, ordem

wpjy_contratos_documentos

  • id — int • NOT NULL • PRI
  • nome — varchar(255) • NOT NULL
  • descricao — text
  • texto — longtext • NOT NULL
  • status — varchar(20) • NOT NULL
  • versao — int • NOT NULL
  • created_at — datetime
  • updated_at — datetime

Índices

  • PRIMARY → id

wpjy_contratos_fotos

  • id — int • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • url — varchar(255) • NOT NULL
  • legenda — varchar(160)
  • ordem — int • NOT NULL
  • ativo — tinyint(1) • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_contrato → id_contrato, ativo, ordem

wpjy_contratos_horarios

  • id — int • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • dia_semana — tinyint • NOT NULL
  • abre — time
  • fecha — time
  • fechado — tinyint(1) • NOT NULL
  • ativo — tinyint(1) • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_contrato_dia → id_contrato, dia_semana
  • idx_contrato_ativo → id_contrato, ativo

wpjy_contratos_niveis

  • id — int • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • superior_id — int
  • nome — varchar(100) • NOT NULL
  • descricao — text
  • ordem — int
  • ativo — tinyint(1) • NOT NULL
  • criado_em — datetime
  • vendedor — tinyint(1)

Índices

  • PRIMARY → id
  • id_contrato → id_contrato

wpjy_contratos_niveis_grupos

  • id_nivel — int • NOT NULL • PRI
  • id_grupo — int • NOT NULL • PRI

Índices

  • PRIMARY → id_nivel, id_grupo
  • idx_ng_grupo → id_grupo

wpjy_contratos_pacotes

  • id — int • NOT NULL • PRI
  • id_contrato — int • NOT NULL
  • beneficio — int • NOT NULL
  • nome — varchar(255) • NOT NULL
  • valor — decimal(10,2) • NOT NULL
  • valor_anual — decimal(10,2)
  • valor_trimestral — decimal(10,2)
  • valor_semestral — decimal(10,2)
  • valor_interno — decimal(10,2)
  • periodicidade — varchar(50)
  • vendavel — tinyint(1)
  • divulgavel — tinyint(1)
  • oculto — tinyint(1)
  • resumo — text
  • descricao — text
  • termos — text
  • contrato — text
  • imagem — varchar(255)
  • isento — tinyint(1)
  • lixeira — tinyint(1)
  • mk1 — decimal(10,2)
  • mk2 — decimal(10,2)
  • mk3 — decimal(10,2)
  • mk4 — decimal(10,2)
  • ordem — int
  • destaque — tinyint(1)

Índices

  • PRIMARY → id

wpjy_contratos_planos

  • id — int • NOT NULL • PRI
  • id_contrato — int • MUL
  • nome — varchar(45)
  • nome_interno — varchar(45)
  • data_cad — datetime
  • dia_vencimento — int
  • codigo_cartao — varchar(30)
  • carta_berco — varchar(45)
  • idade_limite — int
  • idade_minima — int
  • carencia — int
  • trocar_plano — tinyint(1) • NOT NULL
  • signature — tinyint(1) • NOT NULL
  • venda_exterior — tinyint(1) • NOT NULL
  • moeda — varchar(5)
  • valor — decimal(10,2)
  • valor_exib — decimal(10,2)
  • valor_adesao — decimal(10,2)
  • valor_adesao_exib — decimal(10,2)
  • valor_anual — decimal(10,2)
  • valor_trimestral — decimal(10,2)
  • valor_semestral — decimal(10,2)
  • valor_anual_exib — decimal(10,2)
  • valor_interno — decimal(10,2)
  • valor_externo — decimal(10,2)
  • cartao_frente — text
  • cartao_frente_texto — longtext
  • cartao_tras — text
  • cartao_tras_texto — longtext
  • cartao_letra_cor — varchar(12)
  • cartao_letra_sombra_cor — varchar(12)
  • id_gateway — varchar(20) • MUL
  • gateway — int • MUL
  • metodos — varchar(100)
  • peridiocidade — varchar(50) • NOT NULL
  • boleto_instrucoes — text
  • certificado — longtext
  • vendavel — tinyint
  • adicional — tinyint
  • divulgavel — tinyint
  • divulgadores — varchar(150)
  • oculto — tinyint
  • exclusivo — tinyint • NOT NULL
  • ocultar_menu — text • NOT NULL
  • dependentes — tinyint
  • dependente_outros — tinyint
  • dependente_filho_idade — tinyint
  • dependente_valor — decimal(10,2)
  • dependente_mae — tinyint
  • pagamento_externo — mediumtext
  • texto_cadastro — text
  • termos — text
  • termos_url — mediumtext
  • contrato_url — mediumtext
  • docs_bg — mediumtext
  • contrato — text
  • resumo — text
  • descricao — text
  • imagem — text
  • isento — tinyint
  • lixeira — tinyint
  • mk1 — decimal(10,2)
  • mk2 — decimal(10,2)
  • mk3 — decimal(10,2)
  • mk4 — decimal(10,2)
  • comissao_representante — decimal(10,2)
  • comissao_representante_adesao — decimal(10,2)
  • comissao_representante_tipo — char(1)
  • comissao_representante_tipo_adesao — char(1)
  • comissao_representante_modalidade — varchar(10)
  • comissao_vendedor — decimal(10,2)
  • comissao_vendedor_adesao — decimal(10,2)
  • comissao_vendedor_tipo — char(1)
  • comissao_vendedor_tipo_adesao — char(1)
  • comissao_vendedor_modalidade — varchar(10)
  • comissao_minimo — decimal(10,2)
  • comissao_adesao — decimal(10,2)
  • comissao_adesao_asc — decimal(10,2)
  • cartao_acrescimento — decimal(10,2)
  • pix_desconto — decimal(10,2)
  • comissao_minimo_tipo — char(1)
  • recorrencia_auto — tinyint
  • pagamento_unico — tinyint
  • cartao_virtual — tinyint
  • cashback — tinyint
  • ordem_exib — int
  • parcelas — int
  • divulgador — tinyint(1) • NOT NULL
  • parcelamento — tinyint(1) • NOT NULL
  • destaque — tinyint(1) • NOT NULL
  • nome_mae — tinyint(1) • NOT NULL
  • facebook — tinyint(1) • NOT NULL
  • instagram — tinyint(1) • NOT NULL
  • foto — tinyint(1) • NOT NULL
  • split_1_wallet — varchar(255)
  • split_1_valor — decimal(10,2)
  • split_1_tipo — varchar(20)
  • split_2_wallet — varchar(255)
  • split_2_valor — decimal(10,2)
  • split_2_tipo — varchar(20)
  • split_3_wallet — varchar(255)
  • split_3_valor — decimal(10,2)
  • split_3_tipo — varchar(20)
  • split_4_wallet — varchar(255)
  • split_4_valor — decimal(10,2)
  • split_4_tipo — varchar(20)
  • split — tinyint
  • limite_cobrancas — tinyint
  • plano_dependentes — int

Índices

  • PRIMARY → id
  • id_contrato → id_contrato
  • gateway → id_gateway
  • id_gatewat_idx → gateway
  • idx_contratos_planos_id_contrato → id_contrato
  • idx_id → id

wpjy_contratos_planos_convenios

  • id — int • NOT NULL • PRI
  • id_contrato_plano — int • MUL
  • id_convenio — int • MUL

Índices

  • PRIMARY → id
  • ids → id_contrato_plano, id_convenio
  • id_contrato_plano → id_contrato_plano
  • id_convenio → id_convenio

wpjy_contratos_planos_promotores

  • id — int • NOT NULL • PRI
  • user_id — bigint unsigned • MUL
  • id_contrato_plano — int • MUL
  • user_pai — bigint unsigned • MUL
  • valor — decimal(10,2)
  • tipo — varchar(1)
  • data_criacao — datetime • NOT NULL

Índices

  • PRIMARY → id
  • id_plano_user → id_contrato_plano, user_id
  • user_id → user_id
  • id_contrato_plano → id_contrato_plano
  • user_pai → user_pai

wpjy_contratos_planos_representantes

  • id — int • NOT NULL • PRI
  • id_representante — int • NOT NULL • MUL
  • id_contrato_plano — int • NOT NULL • MUL

Índices

  • PRIMARY → id
  • Index 4 → id_representante, id_contrato_plano
  • id_representante → id_representante
  • id_contrat_plano → id_contrato_plano

wpjy_contratos_site

  • id — int • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • logo — varchar(10)
  • cor1 — varchar(12) • NOT NULL
  • cor2 — varchar(12) • NOT NULL
  • cor3 — varchar(12) • NOT NULL
  • cor_fundo_header — varchar(12) • NOT NULL
  • cor_header_link — varchar(12) • NOT NULL
  • cor_fundo_cadastro — varchar(12) • NOT NULL
  • cor_fundo_pagamento — varchar(12) • NOT NULL
  • cor_fundo_area_cliente — varchar(12) • NOT NULL
  • cor_fundo_area_divulgador — varchar(12) • NOT NULL
  • header_sticky — tinyint(1) • NOT NULL
  • header_transparencia — tinyint • NOT NULL
  • top_bar — tinyint(1) • NOT NULL
  • ocultar_beneficios — tinyint(1) • NOT NULL
  • ocultar_planos — tinyint(1) • NOT NULL
  • beneficios_descricao — tinyint(1) • NOT NULL
  • beneficios_carrossel — tinyint(1) • NOT NULL
  • planos_carrossel — tinyint(1) • NOT NULL
  • beneficios_tipo — varchar(50) • NOT NULL
  • favicon — mediumtext • NOT NULL
  • banner_bg — mediumtext • NOT NULL
  • banner_bg_mobile — mediumtext • NOT NULL
  • banner_transparencia — int
  • banner_cor — varchar(12)
  • banner_content_bg — varchar(12)
  • banner_texto_dir — longtext
  • banner_texto_esq — longtext
  • botao_tipo — varchar(1) • NOT NULL
  • botao_ben_cor1 — varchar(12)
  • botao_ben_cor2 — varchar(12)
  • botao_ben_cor3 — varchar(12)
  • logo_rodape — varchar(10)
  • rodape_cor1 — varchar(12)
  • rodape_cor2 — varchar(12)
  • rodape_cor_link — varchar(12)
  • tipo — tinyint
  • banner_bg2 — mediumtext • NOT NULL
  • banner_bg3 — mediumtext • NOT NULL
  • banner_bg2_mobile — mediumtext • NOT NULL
  • banner_bg3_mobile — mediumtext • NOT NULL
  • banner_fx1 — mediumtext
  • banner_fx2 — mediumtext
  • banner_fx3 — mediumtext
  • banner_fx4 — mediumtext
  • banner_fx5 — mediumtext
  • banner_fx6 — mediumtext
  • banner_texto2_dir — longtext • NOT NULL
  • banner_texto3_dir — longtext • NOT NULL
  • banner_texto2_esq — longtext
  • banner_texto3_esq — longtext
  • banner_fxar1 — mediumtext
  • banner_fxar2 — mediumtext
  • banner_fxar3 — mediumtext
  • banner_fxar4 — mediumtext
  • link_banner_fxar1 — text
  • link_banner_fxar2 — text
  • link_banner_fxar3 — text
  • link_banner_fxar4 — text
  • banner_bg1_mobile_fx — mediumtext • NOT NULL
  • banner_bg2_mobile_fx — mediumtext • NOT NULL
  • banner_bg3_mobile_fx — mediumtext
  • banner_bg4_mobile_fx — mediumtext
  • link_banner_fx1 — mediumtext
  • link_banner_fx2 — mediumtext
  • link_banner_fx3 — mediumtext
  • link_banner_fx4 — mediumtext
  • banner_parceiros — mediumtext
  • titulo_planos — varchar(45)
  • subtitulo_planos — varchar(60)
  • titulo_beneficios — varchar(45)
  • subtitulo_beneficios — varchar(60)
  • banner_fxar_mobile_1 — mediumtext
  • banner_fxar_mobile_2 — mediumtext
  • banner_fxar_mobile_3 — mediumtext
  • banner_fxar_mobile_4 — mediumtext
  • nomebotaoplano — varchar(45)
  • home — varchar(100)
  • beneficios_home — text
  • css — text
  • js_header — text
  • js_footer — text
  • seo_titulo — varchar(150)
  • seo_descricao — text
  • map_api_key — mediumtext

Índices

  • PRIMARY → id
  • id_contrato → id_contrato

wpjy_contratos_site_ativos

  • id — int unsigned • NOT NULL • PRI
  • contrato — int • NOT NULL
  • planos — text
  • media — text
  • tipo — varchar(50) • NOT NULL
  • dispositivos — varchar(50)
  • titulo — varchar(250) • NOT NULL
  • texto_alternativo — text
  • legenda — text
  • descricao — text
  • alinhamento — enum('Nenhum','Esquerda','Direita','Centro')
  • apontamento — enum('Nenhum','Arquivo','URL')
  • label — varchar(50)
  • destino — enum('_self','_blank')
  • url — varchar(250)
  • area — varchar(50)
  • status — tinyint(1)
  • ocultar_titulo — tinyint(1)
  • ordem — tinyint
  • tamanho_desktop — varchar(50)
  • tamanho_mobile — varchar(50)
  • criado — datetime • NOT NULL
  • cor_padrao — varchar(50)
  • largura_total — tinyint(1)
  • css — text
  • fundo_imagem — text
  • fundo_imagem_tamanho — varchar(50)
  • fundo_imagem_repetir — varchar(50)
  • fundo_imagem_anexo — varchar(50)
  • fundo_imagem_posicao — varchar(50)
  • tipo_borda — text
  • borda_superior — tinyint
  • borda_direita — tinyint
  • borda_inferior — tinyint
  • borda_esquerda — tinyint
  • cor_borda — varchar(50)
  • arredondamento_superior — tinyint
  • arredondamento_direita — tinyint
  • arredondamento_inferior — tinyint
  • arredondamento_esquerda — tinyint
  • layout — text
  • classe_css — varchar(50)
  • id_css — varchar(50)
  • zindex — tinyint
  • efeito_json — text

Índices

  • PRIMARY → id

wpjy_contratos_site_menu

  • id — int unsigned • NOT NULL • PRI
  • label — varchar(200) • NOT NULL
  • link — varchar(100) • NOT NULL
  • parent — int unsigned • NOT NULL
  • sort — int unsigned • NOT NULL
  • contrato — int • MUL
  • target — varchar(25)
  • icon — varchar(50)
  • position — tinytext

Índices

  • PRIMARY → id
  • idx_csm_contrato_parent → contrato, parent
  • idx_csm_contrato_sort → contrato, sort

wpjy_convenios

  • id — int • NOT NULL • PRI
  • nome — varchar(100)
  • dia_corte — int
  • apolice — varchar(80)
  • valor — decimal(18,2)
  • responsavel — varchar(100)
  • responsavel_contato — varchar(45)
  • responsavel_email — varchar(100)
  • objeto — text
  • vigencia_inicio — datetime
  • vigencia_fim — datetime
  • lixeira — tinyint

Índices

  • PRIMARY → id

wpjy_convenios_beneficios

  • id — int • NOT NULL • PRI
  • nome — varchar(50)
  • ordem — int
  • texto_plano — text
  • texto_out — longtext
  • texto_in — longtext
  • url_acessar_in — text
  • url_acessar_out — text
  • icone_botao — varchar(100)
  • texto_botao — varchar(50)
  • id_beneficio_pai — int
  • lixeira — tinyint
  • oculta_home — tinyint
  • imagem — varchar(250)
  • slug — varchar(150)
  • cor_padrao — varchar(50)

Índices

  • PRIMARY → id

wpjy_convenios_export

  • id — int • NOT NULL • PRI
  • user_id — bigint unsigned • NOT NULL • UNI
  • id_contrato_plano_convenio — int • NOT NULL • MUL
  • cpf — varchar(12) • MUL
  • nome — varchar(100)
  • data_nascimento — date
  • sexo — varchar(1)
  • cep — varchar(10)
  • logradouro — varchar(250)
  • numero — varchar(10)
  • complemento — varchar(20)
  • bairro — varchar(45)
  • cidade — varchar(45)
  • uf — varchar(2)
  • telefone — varchar(20)
  • celular — varchar(20)
  • email — varchar(100)
  • mes_ano — date • NOT NULL

Índices

  • PRIMARY → id
  • user_id_un → user_id
  • unicos → id_contrato_plano_convenio, cpf, mes_ano
  • user_id → user_id
  • cpf → cpf
  • id_contrato_plano_convenio → id_contrato_plano_convenio

wpjy_convenios_modelo

  • id — int • NOT NULL • PRI
  • id_convenio — int • MUL
  • tipo — varchar(10)
  • modelo — text
  • dependentes — tinyint

Índices

  • PRIMARY → id
  • id_id_convenio → id, id_convenio
  • id_convenio → id_convenio

wpjy_corp

  • id — int • NOT NULL • PRI
  • nome — varchar(30) • NOT NULL
  • slug — varchar(30) • NOT NULL

Índices

  • PRIMARY → id

wpjy_corretoras

  • id — int • NOT NULL • PRI
  • nome — varchar(120) • NOT NULL
  • slug — varchar(80)
  • cnpj — varchar(20)
  • email — varchar(120)
  • telefone — varchar(30)
  • status — varchar(20) • NOT NULL
  • created_at — datetime • NOT NULL
  • updated_at — datetime

Índices

  • PRIMARY → id

wpjy_corretoras_contratos

  • id — int • NOT NULL • PRI
  • corretora_id — int • NOT NULL • MUL
  • contrato_id — int • NOT NULL • MUL
  • role — varchar(30) • NOT NULL
  • ativo — tinyint(1) • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uk_corretora_contrato → corretora_id, contrato_id
  • idx_contrato → contrato_id

wpjy_corretoras_invites

  • id — int • NOT NULL • PRI
  • corretora_id — int • NOT NULL • MUL
  • email — varchar(190) • NOT NULL • MUL
  • token — char(64) • NOT NULL • UNI
  • status — varchar(20) • NOT NULL • MUL
  • created_by — bigint unsigned
  • created_at — datetime • NOT NULL
  • used_at — datetime
  • used_by — bigint unsigned
  • expires_at — datetime

Índices

  • PRIMARY → id
  • uk_token → token
  • idx_corretora → corretora_id
  • idx_email → email
  • idx_status → status

wpjy_corretoras_users

  • id — int • NOT NULL • PRI
  • corretora_id — int • NOT NULL • MUL
  • user_id — bigint unsigned • NOT NULL • MUL
  • role — varchar(30) • NOT NULL
  • ativo — tinyint(1) • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uk_corretora_user → corretora_id, user_id
  • idx_user → user_id

wpjy_crm_client_tags

  • id_profissional — bigint unsigned • NOT NULL • PRI
  • user_id — bigint unsigned • NOT NULL • PRI
  • tag — varchar(40) • NOT NULL • PRI
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id_profissional, user_id, tag
  • idx_prof → id_profissional

wpjy_crm_clients_cache

  • id_profissional — bigint unsigned • NOT NULL • PRI
  • user_id — bigint unsigned • NOT NULL • PRI
  • total_orders — int unsigned • NOT NULL
  • total_paid — decimal(14,2) • NOT NULL
  • first_at — datetime
  • last_at — datetime
  • last_status — varchar(32)
  • r_score — tinyint unsigned
  • f_score — tinyint unsigned
  • m_score — tinyint unsigned
  • seg — varchar(16)

Índices

  • PRIMARY → id_profissional, user_id
  • idx_seg → id_profissional, seg
  • idx_last → id_profissional, last_at

wpjy_crm_events

  • id — bigint unsigned • NOT NULL • PRI
  • id_profissional — bigint unsigned • NOT NULL • MUL
  • user_id — bigint unsigned • NOT NULL
  • type — enum('order','payment','appointment','note','task','message') • NOT NULL • MUL
  • title — varchar(255) • NOT NULL
  • meta — json
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_prof_user → id_profissional, user_id, created_at
  • idx_type → type, created_at

wpjy_crm_tasks

  • id — bigint unsigned • NOT NULL • PRI
  • id_profissional — bigint unsigned • NOT NULL • MUL
  • user_id — bigint unsigned • NOT NULL
  • title — varchar(180) • NOT NULL
  • due_at — datetime
  • status — enum('open','done','snoozed','cancelled') • NOT NULL
  • created_at — datetime • NOT NULL
  • done_at — datetime

Índices

  • PRIMARY → id
  • idx_prof_user → id_profissional, user_id
  • idx_prof_due → id_profissional, status, due_at

wpjy_crm_views

  • id — bigint unsigned • NOT NULL • PRI
  • id_profissional — bigint unsigned • NOT NULL • MUL
  • name — varchar(80) • NOT NULL
  • filters — json • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_prof_name → id_profissional, name

wpjy_crons

  • id — int • NOT NULL • PRI
  • nome — varchar(255) • NOT NULL
  • data — datetime • NOT NULL
  • status — varchar(20) • NOT NULL
  • erro — varchar(255)

Índices

  • PRIMARY → id

wpjy_cupons

  • id — int • NOT NULL • PRI
  • codigo — varchar(255) • NOT NULL • UNI
  • tipo — enum('fixo','percentual') • NOT NULL
  • desconto — decimal(10,2) • NOT NULL
  • contrato_id — int • NOT NULL • MUL
  • planos_ids — varchar(255) • NOT NULL
  • data_validade — datetime • NOT NULL
  • data_inicio — datetime • NOT NULL
  • mensalidades — tinyint(1)

Índices

  • PRIMARY → id
  • codigo → codigo
  • contrato_id → contrato_id

wpjy_currency_rates

  • id — int • NOT NULL • PRI
  • currency — varchar(3) • NOT NULL
  • rate — decimal(20,6) • NOT NULL
  • timestamp — int • NOT NULL

Índices

  • PRIMARY → id

wpjy_currency_rates_brl

  • id — int • NOT NULL • PRI
  • currency — varchar(3) • NOT NULL
  • rate — decimal(20,6) • NOT NULL
  • timestamp — int • NOT NULL

Índices

  • PRIMARY → id

wpjy_divulgacao_links

  • id — int • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • nome — varchar(255) • NOT NULL
  • url_base — text • NOT NULL
  • descricao — text
  • status — tinyint(1)
  • data_criacao — datetime

Índices

  • PRIMARY → id
  • id_contrato → id_contrato

wpjy_documentos

  • id — int • NOT NULL • PRI
  • nome — varchar(50)
  • url — text
  • tabela — varchar(100) • MUL
  • id_auxiliar — int • MUL
  • data_criacao — datetime

Índices

  • PRIMARY → id
  • id_auxiliar → id_auxiliar
  • tabela → tabela

wpjy_documentos_entregas

  • id — int • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • documento_tipo_id — int • NOT NULL
  • entidade — enum('empresa','profissional','cliente','lead','usuario') • NOT NULL • MUL
  • entidade_id — int • NOT NULL
  • contexto — enum('geral','agendamento','pedido') • NOT NULL • MUL
  • contexto_id — int
  • arquivo — varchar(255) • NOT NULL
  • data_upload — datetime
  • usuario_id — int
  • visivel_para_cliente — tinyint(1) • NOT NULL
  • visivel_para_profissional — tinyint(1) • NOT NULL
  • assinado_digitalmente — tinyint(1)
  • hash_assinatura — varchar(255)
  • status — enum('pendente','enviado','assinado','validado','recusado')
  • data_validacao — datetime
  • validador_id — int
  • motivo_recusa — text

Índices

  • PRIMARY → id
  • id_contrato → id_contrato, documento_tipo_id, entidade, entidade_id
  • idx_contexto → contexto, contexto_id
  • idx_entidade_contexto → entidade, entidade_id, contexto, contexto_id

wpjy_documentos_tipos

  • id — int • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • entidades — set('empresa','profissional','cliente','lead','usuario') • NOT NULL
  • nome — varchar(255) • NOT NULL
  • descricao — text
  • obrigatorio — tinyint(1)
  • aceita_upload — tinyint(1)
  • aceita_assinatura — tinyint(1)
  • requer_validacao — tinyint(1)
  • modelo_arquivo — varchar(255)
  • ativo — tinyint(1)
  • ordem — int

Índices

  • PRIMARY → id
  • id_contrato → id_contrato

wpjy_e_events

  • id — bigint unsigned • NOT NULL • PRI
  • event_data — text
  • created_at — datetime • NOT NULL • MUL

Índices

  • PRIMARY → id
  • created_at_index → created_at

wpjy_e_notes

  • id — bigint unsigned • NOT NULL • PRI
  • route_url — text • MUL
  • route_title — varchar(255)
  • route_post_id — bigint unsigned
  • post_id — bigint unsigned • MUL
  • element_id — varchar(60) • MUL
  • parent_id — bigint unsigned • NOT NULL • MUL
  • author_id — bigint unsigned • MUL
  • author_display_name — varchar(250)
  • status — varchar(20) • NOT NULL • MUL
  • position — text
  • content — longtext
  • is_resolved — tinyint(1) • NOT NULL • MUL
  • is_public — tinyint(1) • NOT NULL • MUL
  • last_activity_at — datetime • MUL
  • created_at — datetime • NOT NULL • MUL
  • updated_at — datetime • NOT NULL • MUL

Índices

  • PRIMARY → id
  • route_url_index → route_url
  • post_id_index → post_id
  • element_id_index → element_id
  • parent_id_index → parent_id
  • author_id_index → author_id
  • status_index → status
  • is_resolved_index → is_resolved
  • is_public_index → is_public
  • created_at_index → created_at
  • updated_at_index → updated_at
  • last_activity_at_index → last_activity_at

wpjy_e_notes_users_relations

  • id — bigint unsigned • NOT NULL • PRI
  • type — varchar(60) • NOT NULL • MUL
  • note_id — bigint unsigned • NOT NULL • MUL
  • user_id — bigint unsigned • NOT NULL • MUL
  • created_at — datetime • NOT NULL
  • updated_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • type_index → type
  • note_id_index → note_id
  • user_id_index → user_id

wpjy_e_submissions

  • id — bigint unsigned • NOT NULL • PRI
  • type — varchar(60) • MUL
  • hash_id — varchar(60) • NOT NULL • UNI
  • main_meta_id — bigint unsigned • NOT NULL • MUL
  • post_id — bigint unsigned • NOT NULL • MUL
  • referer — varchar(500) • NOT NULL • MUL
  • referer_title — varchar(300) • MUL
  • element_id — varchar(20) • NOT NULL • MUL
  • form_name — varchar(60) • NOT NULL
  • campaign_id — bigint unsigned • NOT NULL • MUL
  • user_id — bigint unsigned • MUL
  • user_ip — varchar(46) • NOT NULL • MUL
  • user_agent — text • NOT NULL
  • actions_count — int
  • actions_succeeded_count — int
  • status — varchar(20) • NOT NULL • MUL
  • is_read — tinyint(1) • NOT NULL • MUL
  • meta — text
  • created_at_gmt — datetime • NOT NULL • MUL
  • updated_at_gmt — datetime • NOT NULL • MUL
  • created_at — datetime • NOT NULL • MUL
  • updated_at — datetime • NOT NULL • MUL

Índices

  • PRIMARY → id
  • hash_id_unique_index → hash_id
  • main_meta_id_index → main_meta_id
  • hash_id_index → hash_id
  • type_index → type
  • post_id_index → post_id
  • element_id_index → element_id
  • campaign_id_index → campaign_id
  • user_id_index → user_id
  • user_ip_index → user_ip
  • status_index → status
  • is_read_index → is_read
  • created_at_gmt_index → created_at_gmt
  • updated_at_gmt_index → updated_at_gmt
  • created_at_index → created_at
  • updated_at_index → updated_at
  • referer_index → referer
  • referer_title_index → referer_title

wpjy_e_submissions_actions_log

  • id — bigint unsigned • NOT NULL • PRI
  • submission_id — bigint unsigned • NOT NULL • MUL
  • action_name — varchar(60) • NOT NULL • MUL
  • action_label — varchar(60)
  • status — varchar(20) • NOT NULL • MUL
  • log — text
  • created_at_gmt — datetime • NOT NULL • MUL
  • updated_at_gmt — datetime • NOT NULL • MUL
  • created_at — datetime • NOT NULL • MUL
  • updated_at — datetime • NOT NULL • MUL

Índices

  • PRIMARY → id
  • submission_id_index → submission_id
  • action_name_index → action_name
  • status_index → status
  • created_at_gmt_index → created_at_gmt
  • updated_at_gmt_index → updated_at_gmt
  • created_at_index → created_at
  • updated_at_index → updated_at

wpjy_e_submissions_values

  • id — bigint unsigned • NOT NULL • PRI
  • submission_id — bigint unsigned • NOT NULL • MUL
  • key — varchar(60) • MUL
  • value — longtext

Índices

  • PRIMARY → id
  • submission_id_index → submission_id
  • key_index → key

wpjy_easywpsmtp_debug_events

  • id — int unsigned • NOT NULL • PRI
  • content — text
  • initiator — text
  • event_type — tinyint unsigned • NOT NULL
  • created_at — timestamp • NOT NULL

Índices

  • PRIMARY → id

wpjy_easywpsmtp_tasks_meta

  • id — bigint • NOT NULL • PRI
  • action — varchar(255) • NOT NULL
  • data — longtext • NOT NULL
  • date — datetime • NOT NULL

Índices

  • PRIMARY → id

wpjy_emails

  • id — int • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • slug — varchar(50) • NOT NULL • MUL
  • nome — varchar(50) • NOT NULL
  • assunto — varchar(80) • NOT NULL
  • texto — longtext • NOT NULL

Índices

  • PRIMARY → id
  • slug → slug
  • id_contrato → id_contrato

wpjy_emails_campanhas

  • id — int • NOT NULL • PRI
  • contrato — int • MUL
  • tipo — varchar(255) • NOT NULL
  • tipo_id — int
  • titulo — varchar(255) • NOT NULL
  • mensagem — text
  • data_envio — datetime
  • data_criacao — datetime
  • numero_envio — int • NOT NULL
  • agendamento — datetime

Índices

  • PRIMARY → id
  • contrato → contrato

wpjy_emails_destinatarios

  • id — int • NOT NULL • PRI
  • campanha — int • NOT NULL • MUL
  • user_id — int • NOT NULL • MUL
  • email — varchar(255) • NOT NULL
  • nome — varchar(255)
  • numero_envio — int • NOT NULL
  • ultimo_envio — datetime

Índices

  • PRIMARY → id
  • campanha → campanha
  • user_id → user_id

wpjy_emails_enviados

  • id — int • NOT NULL • PRI
  • userid — int • NOT NULL • MUL
  • subject — text • NOT NULL
  • message — text • NOT NULL
  • date — datetime
  • to — text
  • cc — text
  • bcc — text
  • attachments — text
  • pending — tinyint(1) • NOT NULL • MUL
  • message_data — mediumtext
  • failed — tinyint(1) • NOT NULL
  • failure_reason — varchar(250) • NOT NULL
  • retry_count — tinyint(1) • NOT NULL
  • created_at — timestamp
  • updated_at — timestamp
  • campaign_id — int • NOT NULL • MUL

Índices

  • PRIMARY → id
  • userid → userid
  • pending → pending
  • campaign_id → campaign_id

wpjy_emails_status_envio

  • id — int • NOT NULL • PRI
  • campanha — int • NOT NULL • MUL
  • destinatario — int • NOT NULL • MUL
  • email — varchar(255) • NOT NULL
  • data_envio — datetime
  • status — varchar(255)
  • numero_envio — int • NOT NULL

Índices

  • PRIMARY → id
  • campanha → campanha
  • id → destinatario

wpjy_empresa_atuacoes

  • empresa_id — int • NOT NULL • PRI
  • atuacao_id — int • NOT NULL • PRI

Índices

  • PRIMARY → empresa_id, atuacao_id

wpjy_empresa_especialidades

  • empresa_id — int • NOT NULL • PRI
  • especialidade_id — int • NOT NULL • PRI

Índices

  • PRIMARY → empresa_id, especialidade_id

wpjy_equipes

  • id — int • NOT NULL • PRI
  • nome — varchar(100) • NOT NULL
  • descricao — text
  • imagem — text
  • contrato — int • MUL
  • criado_por — int • MUL
  • ativo — tinyint(1) • MUL
  • data_criacao — datetime
  • leads_atendente — tinyint

Índices

  • PRIMARY → id
  • idx_equipes_contrato → contrato
  • idx_equipes_ativo → ativo
  • idx_equipes_criado_por → criado_por
  • idx_equipes_contrato_ativo → contrato, ativo

wpjy_equipes_usuarios

  • id — int • NOT NULL • PRI
  • equipe_id — int • NOT NULL • MUL
  • user_id — bigint unsigned • NOT NULL • MUL
  • superior_user_id — bigint unsigned • MUL
  • papel — varchar(50) • NOT NULL
  • id_nivel — int • MUL
  • ativo — tinyint(1) • MUL
  • data_adicionado — datetime

Índices

  • PRIMARY → id
  • equipe_id → equipe_id, user_id
  • uq_equipes_usuarios → equipe_id, user_id
  • idx_eu_user_id → user_id
  • idx_eu_id_nivel → id_nivel
  • idx_eu_superior_user_id → superior_user_id
  • idx_eu_ativo → ativo
  • idx_equipes_usuarios_user → user_id, equipe_id
  • idx_eu_user_ativo → user_id, ativo, equipe_id

wpjy_events

  • id — bigint unsigned • NOT NULL • PRI
  • occurred_at — datetime • NOT NULL • MUL
  • actor_id — bigint unsigned • MUL
  • actor_type — enum('user','system','webhook') • NOT NULL
  • actor_label — varchar(120)
  • verb — varchar(40) • NOT NULL • MUL
  • entity — varchar(40) • NOT NULL • MUL
  • entity_id — bigint unsigned
  • contract_id — bigint unsigned • MUL
  • account_id — bigint unsigned
  • status — enum('ok','error','partial') • NOT NULL • MUL
  • severity — tinyint unsigned • NOT NULL
  • channel — enum('app','api','webhook','cron') • NOT NULL • MUL
  • message — text
  • meta_json — json
  • url — varchar(255)
  • ip — varchar(45)
  • user_agent — varchar(255)

Índices

  • PRIMARY → id
  • idx_time → occurred_at
  • idx_actor_time → actor_id, occurred_at
  • idx_entity_time → entity, entity_id, occurred_at
  • idx_contract_time → contract_id, occurred_at
  • idx_channel → channel
  • idx_status → status
  • idx_verb → verb

wpjy_faturas

  • id — int • NOT NULL • PRI
  • tipo — varchar(45)
  • id_auxiliar — int • MUL
  • status — varchar(45) • MUL
  • subtipo — varchar(45)
  • valor — decimal(18,2)
  • valor_pago — decimal(18,2)
  • metodo — varchar(20)
  • metodo_baixa — varchar(20)
  • data_criacao — datetime
  • data_referencia — date
  • data_vencimento — date
  • data_pagamento — datetime
  • auto_cobranca — tinyint
  • obs — text
  • id_remessa — int • MUL
  • msgcustom — text
  • gateway — varchar(20) • MUL
  • id_gateway — varchar(45)
  • id_gateway_fatura — varchar(150)
  • id_gateway_carne — varchar(150)
  • id_gateway_assinatura — varchar(150)
  • gateway_parcela — tinyint
  • liquido — decimal(20,6)
  • data_pagamento_real — date
  • comprovante — varchar(150)
  • notificacao — int
  • user_id — int • NOT NULL
  • cliente — varchar(250)
  • moeda — varchar(50)
  • taxa — decimal(20,6)
  • reajuste — int
  • cupom — int
  • fatura_principal — int

Índices

  • PRIMARY → id
  • id_auxiliar → id_auxiliar
  • gateway → gateway
  • id_remessa → id_remessa
  • idx_faturas_status → status

wpjy_faturas_itens

  • id — int unsigned • NOT NULL • PRI
  • fatura — int
  • tipo — varchar(50)
  • rel_id — int
  • descricao — text
  • total — decimal(10,2)
  • taxa — int
  • notas — text

Índices

  • PRIMARY → id

wpjy_favoritos

  • id — bigint unsigned • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • user_id — bigint unsigned • NOT NULL • MUL
  • alvo_tipo — enum('profissional','empresa') • NOT NULL • MUL
  • alvo_id — int • NOT NULL
  • created_at — datetime

Índices

  • PRIMARY → id
  • uq_user_tipo_alvo → user_id, alvo_tipo, alvo_id
  • idx_contrato_user → id_contrato, user_id
  • idx_tipo_alvo → alvo_tipo, alvo_id

wpjy_feature_flags

  • id — bigint unsigned • NOT NULL • PRI
  • flag — varchar(100) • NOT NULL • UNI
  • description — varchar(255)
  • rollout_type — enum('boolean','percentage','by_role','by_user','by_contrato') • NOT NULL
  • rollout_json — json
  • is_enabled — tinyint(1) • NOT NULL
  • created_at — datetime • NOT NULL
  • updated_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_flag → flag

wpjy_fin_balances

  • id — bigint unsigned • NOT NULL • PRI
  • tenant_id — int • NOT NULL • MUL
  • entity_type — enum('platform','professional') • NOT NULL
  • entity_id — bigint • NOT NULL
  • balance — decimal(14,2) • NOT NULL
  • updated_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_balance → tenant_id, entity_type, entity_id

wpjy_fin_card_tokens

  • id — int • NOT NULL • PRI
  • user_id — int • NOT NULL • MUL
  • tenant_id — int • NOT NULL • MUL
  • provider — varchar(50) • NOT NULL
  • brand — varchar(30)
  • last4 — varchar(8)
  • label — varchar(40)
  • token — varchar(100) • NOT NULL
  • exp_month — tinyint
  • exp_year — smallint
  • active — tinyint • NOT NULL
  • is_default — tinyint • NOT NULL
  • created_at — datetime • NOT NULL
  • updated_at — datetime

Índices

  • PRIMARY → id
  • uq_user_token → user_id, tenant_id, provider, token
  • idx_user → user_id
  • idx_tenant → tenant_id
  • idx_card_tokens_user_tenant → user_id, tenant_id, active
  • idx_card_tokens_default → user_id, tenant_id, active, is_default

wpjy_fin_cart_items

  • id — bigint • NOT NULL • PRI
  • cart_id — bigint • NOT NULL • MUL
  • type — enum('service','product','procedure','plan','fee','discount') • NOT NULL • MUL
  • ref_id — bigint
  • qty — decimal(10,2) • NOT NULL
  • unit_price — decimal(14,2) • NOT NULL
  • subtotal — decimal(14,2) • NOT NULL
  • prof_id — int
  • date — date
  • start — time
  • end — time
  • description — varchar(255)
  • meta — json
  • created_at — timestamp

Índices

  • PRIMARY → id
  • idx_cart → cart_id
  • idx_fin_cart_items_cart → cart_id
  • idx_fin_cart_items_slot → type, ref_id, prof_id, date, start

wpjy_fin_carts

  • id — bigint • NOT NULL • PRI
  • user_id — bigint • NOT NULL • MUL
  • status — enum('open','abandoned','converted','closed') • NOT NULL
  • created_at — timestamp

Índices

  • PRIMARY → id
  • uq_user_open → user_id, status
  • idx_fin_carts_user → user_id

wpjy_fin_contract_settings

  • id_contrato — int • NOT NULL • PRI
  • repasse_enabled — tinyint(1) • NOT NULL
  • platform_take_rate_percent — decimal(5,2)
  • use_wallet_split — tinyint(1) • NOT NULL
  • platform_wallet_id — varchar(64)
  • platform_pix_key — varchar(120)
  • platform_pix_key_type — enum('cpf','cnpj','email','phone','aleatoria')
  • updated_at — datetime • NOT NULL

Índices

  • PRIMARY → id_contrato

wpjy_fin_invoices

  • id — bigint • NOT NULL • PRI
  • order_id — bigint • NOT NULL • MUL
  • id_contrato — int • NOT NULL • MUL
  • provider — varchar(64) • MUL
  • method — enum('pix','boleto','card','transfer') • NOT NULL
  • amount — decimal(14,2) • NOT NULL
  • currency — char(3) • NOT NULL
  • status — enum('pending','paid','overdue','cancelled','refunded') • NOT NULL • MUL
  • due_date — datetime • MUL
  • meta — json
  • created_at — timestamp
  • updated_at — timestamp

Índices

  • PRIMARY → id
  • idx_order → order_id
  • idx_status → status, due_date
  • idx_provider → provider
  • idx_invoices_provider_status → provider, status
  • idx_inv_order → order_id
  • idx_inv_tenant → id_contrato
  • idx_fin_invoices_contract → id_contrato
  • idx_fin_invoices_order → order_id
  • idx_fin_invoices_status → status
  • idx_fin_invoices_provider_method → provider, method
  • idx_fin_invoices_due → due_date

wpjy_fin_kpis

  • id — bigint • NOT NULL • PRI
  • metric — varchar(64) • NOT NULL • MUL
  • period — varchar(32)
  • value — decimal(20,4)
  • meta — json
  • updated_at — timestamp

Índices

  • PRIMARY → id
  • uq_metric_period → metric, period

wpjy_fin_ledger

  • id — bigint unsigned • NOT NULL • PRI
  • tenant_id — int • NOT NULL • MUL
  • entity_type — enum('platform','professional') • NOT NULL
  • entity_id — bigint • NOT NULL
  • kind — enum('platform_fee','gateway_fee','payout_professional','adjust') • NOT NULL
  • amount — decimal(14,2) • NOT NULL
  • currency — char(3) • NOT NULL
  • invoice_id — bigint • MUL
  • payment_id — bigint
  • split_id — bigint
  • note — varchar(255)
  • created_at — datetime • NOT NULL • MUL
  • dedup_key — varchar(64) • UNI

Índices

  • PRIMARY → id
  • uq_fin_ledger_dedup → dedup_key
  • idx_entity → tenant_id, entity_type, entity_id, created_at
  • idx_doc → invoice_id, payment_id, split_id
  • idx_created → created_at
  • idx_ledger_tenant_kind_created → tenant_id, kind, created_at

wpjy_fin_order_items

  • id — bigint • NOT NULL • PRI
  • order_id — bigint • NOT NULL • MUL
  • type — enum('service','product','procedure','plan','fee','discount') • NOT NULL • MUL
  • ref_id — bigint
  • qty — decimal(10,2) • NOT NULL
  • unit_price — decimal(14,2) • NOT NULL
  • subtotal — decimal(14,2) • NOT NULL
  • description — varchar(255)
  • meta — json

Índices

  • PRIMARY → id
  • idx_order → order_id
  • idx_ref → type, ref_id
  • idx_order_items_order_type → order_id, type
  • idx_items_order → order_id
  • idx_order_type → order_id, type
  • idx_fin_order_items_order → order_id
  • idx_fin_order_items_ref → type, ref_id

wpjy_fin_orders

  • id — bigint • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • customer_id — bigint • MUL
  • currency — char(3) • NOT NULL
  • status — varchar(32) • NOT NULL • MUL
  • total — decimal(14,2) • NOT NULL
  • meta — json
  • created_at — timestamp • MUL
  • updated_at — timestamp

Índices

  • PRIMARY → id
  • idx_status → created_at, status
  • idx_customer → customer_id, created_at
  • idx_orders_contrato_status_created → id_contrato, status, created_at
  • idx_orders_customer_created → customer_id, created_at
  • idx_fin_orders_contract_customer → id_contrato, customer_id
  • idx_fin_orders_status → status

wpjy_fin_payment_splits

  • id — bigint unsigned • NOT NULL • PRI
  • payment_id — bigint • MUL
  • tenant_id — bigint unsigned • NOT NULL • MUL
  • invoice_id — bigint • NOT NULL • MUL
  • provider — varchar(16) • NOT NULL
  • method — varchar(16) • NOT NULL
  • gross_value — decimal(12,2) • NOT NULL
  • gateway_fee_value — decimal(12,2)
  • platform_fee_percent — decimal(5,2) • NOT NULL
  • platform_fee_value — decimal(12,2) • NOT NULL
  • recipient_id — bigint unsigned
  • recipient_wallet_id — varchar(64)
  • recipient_value — decimal(12,2) • NOT NULL
  • strategy — enum('split','transfer') • NOT NULL • MUL
  • status — enum('scheduled','done','failed') • NOT NULL
  • audit_status — enum('pending','ok','mismatch','manual') • NOT NULL
  • audit_note — varchar(255)
  • gateway_fee_calc — decimal(12,2)
  • net_value_calc — decimal(12,2)
  • discrepancy_value — decimal(12,2)
  • audited_at — datetime
  • audited_by — bigint
  • raw — json
  • created_at — datetime • NOT NULL
  • updated_at — datetime

Índices

  • PRIMARY → id
  • payment_id → payment_id
  • tenant_id → tenant_id
  • invoice_id → invoice_id
  • idx_splits_tenant_status_created → tenant_id, status, created_at
  • idx_splits_invoice_status → invoice_id, status
  • idx_splits_audit → tenant_id, audit_status, created_at
  • fin_splits_strategy_status → strategy, status
  • fin_splits_tenant → tenant_id

wpjy_fin_payments

  • id — bigint • NOT NULL • PRI
  • invoice_id — bigint • NOT NULL • MUL
  • provider — varchar(64) • MUL
  • method — enum('pix','boleto','card','transfer') • NOT NULL
  • amount — decimal(14,2) • NOT NULL
  • status — enum('authorized','captured','paid','failed','cancelled') • NOT NULL • MUL
  • psp_ref — varchar(191) • UNI
  • fees — decimal(14,2)
  • raw — json
  • created_at — timestamp
  • updated_at — timestamp

Índices

  • PRIMARY → id
  • uq_fin_payments_psp_ref → psp_ref
  • uq_fin_payments_psp → provider, psp_ref
  • idx_invoice → invoice_id
  • idx_status → status, created_at
  • idx_psp → provider, method
  • idx_pay_psp_ref → psp_ref
  • idx_fin_payments_invoice → invoice_id
  • idx_fin_payments_status → status
  • ix_fin_payments_psp_ref → psp_ref

wpjy_fin_recipients

  • id — bigint unsigned • NOT NULL • PRI
  • tenant_id — bigint unsigned • NOT NULL • MUL
  • type — enum('user','professional','company') • NOT NULL
  • ref_id — bigint unsigned • NOT NULL
  • provider — varchar(32) • NOT NULL • MUL
  • take_rate_percent — decimal(5,2)
  • split_enabled — tinyint(1)
  • min_payout_value — decimal(12,2)
  • hold_days — smallint
  • customer_id — varchar(64) • MUL
  • pix_key — varchar(120)
  • pix_key_type — enum('cpf','cnpj','email','phone','aleatoria')
  • bank_code — varchar(10)
  • bank_ag — varchar(20)
  • bank_cc — varchar(20)
  • meta — json
  • created_at — datetime
  • updated_at — datetime

Índices

  • PRIMARY → id
  • uq_recipient → tenant_id, type, ref_id, provider
  • idx_provider → provider
  • idx_customer → customer_id
  • idx_recipient_split → tenant_id, type, provider, split_enabled

wpjy_fin_recon

  • id — bigint • NOT NULL • PRI
  • source — varchar(64) • NOT NULL • MUL
  • filename — varchar(255) • NOT NULL
  • rows — int • NOT NULL
  • status — enum('pending','imported','error') • NOT NULL
  • imported_at — datetime
  • created_at — timestamp

Índices

  • PRIMARY → id
  • uq_source_file → source, filename

wpjy_fin_recon_items

  • id — bigint • NOT NULL • PRI
  • recon_id — bigint • NOT NULL • MUL
  • psp_ref — varchar(191)
  • event — varchar(128)
  • amount — decimal(14,2)
  • occurred_at — datetime
  • raw — json

Índices

  • PRIMARY → id
  • idx_recon → recon_id

wpjy_fin_refunds

  • id — bigint • NOT NULL • PRI
  • payment_id — bigint • NOT NULL • MUL
  • amount — decimal(14,2) • NOT NULL
  • status — enum('requested','processing','refunded','failed','cancelled') • NOT NULL
  • reason — varchar(255)
  • psp_ref — varchar(191)
  • raw — json
  • created_at — timestamp

Índices

  • PRIMARY → id
  • idx_payment → payment_id

wpjy_fin_subscriptions

  • id — bigint unsigned • NOT NULL • PRI
  • id_contrato — bigint unsigned • NOT NULL • MUL
  • user_id — bigint unsigned • NOT NULL • MUL
  • plan_code — varchar(64) • NOT NULL • MUL
  • plan_id — bigint unsigned • MUL
  • profissao — varchar(128)
  • status — varchar(32) • NOT NULL
  • cycle — varchar(16) • NOT NULL
  • next_due_date — date
  • psp_provider — varchar(32) • MUL
  • psp_subscription_id — varchar(128)
  • trial_months — int • NOT NULL
  • meta — json
  • created_at — datetime • NOT NULL • MUL
  • updated_at — datetime

Índices

  • PRIMARY → id
  • uq_subscription_psp → psp_provider, psp_subscription_id
  • idx_subscriptions_contrato_status_due → id_contrato, status, next_due_date
  • idx_subscriptions_user → user_id
  • idx_subscriptions_plan → plan_code
  • idx_subscriptions_created_at → created_at
  • idx_subscriptions_contract_plan → id_contrato, plan_id
  • fk_fin_subscriptions_plan → plan_id
  • idx_subscriptions_contract_user_status_due → id_contrato, user_id, status, next_due_date
  • idx_sub_user_plan_active → id_contrato, user_id, plan_code, status

wpjy_fin_webhooks

  • id — bigint • NOT NULL • PRI
  • provider — varchar(64) • NOT NULL • MUL
  • event — varchar(128) • NOT NULL • MUL
  • idempotency_key — varchar(191) • MUL
  • payload — json
  • status — enum('received','processed','error') • NOT NULL • MUL
  • attempts — int • NOT NULL
  • processed_at — datetime
  • created_at — timestamp

Índices

  • PRIMARY → id
  • uq_provider_idem → provider, idempotency_key
  • uq_webhook → provider, idempotency_key
  • uq_fin_webhooks_provider_idem → provider, idempotency_key
  • idx_event → event
  • idx_provider_created → provider, created_at
  • idx_status_created → status, created_at
  • idx_provider_status_created → provider, status, created_at
  • idx_idem → idempotency_key
  • ix_fin_webhooks_status_created → status, created_at
  • ix_fin_webhooks_provider_event → provider, event

wpjy_gateways

  • id — int • NOT NULL • PRI
  • contrato — int • NOT NULL
  • nome — varchar(45)
  • boleto — tinyint
  • pix — tinyint
  • cartao_credito — tinyint
  • sandbox — tinyint
  • chave — text
  • token — text
  • email — text
  • wallet — text
  • webhook — text • NOT NULL
  • slug — varchar(45)
  • agencia — varchar(10)
  • banco — varchar(10)
  • conta — varchar(10)
  • beneficiario — varchar(50)
  • tipo — varchar(20)
  • ativo — tinyint

Índices

  • PRIMARY → id

wpjy_gateways_contratos

  • id — int unsigned • NOT NULL • PRI
  • gateway — int unsigned • NOT NULL • MUL
  • gateway_id — int • MUL
  • contrato — int unsigned • NOT NULL • MUL
  • role — enum('default','cc','corp') • MUL
  • chave — varchar(250) • NOT NULL
  • email — varchar(250)
  • label — varchar(191)
  • wallet — text • NOT NULL
  • webhook — text • NOT NULL
  • config_encrypted — longtext
  • ativo — tinyint unsigned • NOT NULL • MUL
  • boleto — tinyint unsigned • NOT NULL
  • cartao — tinyint unsigned • NOT NULL
  • created_at — timestamp
  • updated_at — timestamp
  • pix — tinyint unsigned • NOT NULL
  • sandbox — tinyint unsigned • NOT NULL
  • agencia — varchar(10) • NOT NULL
  • conta — varchar(25) • NOT NULL
  • beneficiario_nome — varchar(250) • NOT NULL
  • beneficiario_doc — varchar(250) • NOT NULL
  • obs — text • NOT NULL
  • provider_key — int

Índices

  • PRIMARY → id
  • gateway → gateway
  • contrato → contrato
  • idx_contrato_gateway → contrato, gateway
  • idx_contrato_gatewayid → contrato, gateway_id
  • idx_role → role
  • idx_gc_contrato → contrato
  • idx_gc_gateway → gateway_id, gateway
  • idx_gc_role → role
  • idx_gc_ativo → ativo

wpjy_gateways_meta

  • id — int unsigned • NOT NULL • PRI
  • tipo — varchar(50)
  • tipo_id — int
  • campo — varchar(50)
  • valor — varchar(250)
  • gateway — varchar(50)

Índices

  • PRIMARY → id

wpjy_gateways_transactions

  • id — int • NOT NULL • PRI
  • id_fatura — int • NOT NULL • MUL
  • gateway — int • NOT NULL • MUL
  • id_evento — varchar(100) • NOT NULL
  • id_gateway — varchar(50) • NOT NULL
  • data_vencimento — date • NOT NULL
  • data_criacao — datetime • NOT NULL
  • status — varchar(50)
  • evento — varchar(50)
  • tipo — varchar(50)
  • descricao — text
  • log — text

Índices

  • PRIMARY → id
  • id_fatura → id_fatura
  • gateway → gateway

wpjy_grupo_permissao

  • id_grupo — int • NOT NULL • PRI
  • id_permissao — int • NOT NULL • PRI

Índices

  • PRIMARY → id_grupo, id_permissao
  • uq_grupo_permissao → id_grupo, id_permissao
  • id_permissao → id_permissao
  • idx_grupo_permissao_id_grupo → id_grupo
  • idx_grupo_permissao_id_permissao → id_permissao
  • idx_gp_grupo → id_grupo
  • idx_gp_perm → id_permissao
  • idx_id_permissao → id_permissao

wpjy_grupos_permissoes

  • id — int • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • nome — varchar(100) • NOT NULL
  • slug — varchar(100) • NOT NULL
  • cor — varchar(20)
  • icone — varchar(50)
  • nivel — int • NOT NULL • MUL
  • parent — int • MUL
  • descricao — text

Índices

  • PRIMARY → id
  • uq_grupos_contrato_slug → id_contrato, slug
  • idx_grupos_permissoes_id_contrato → id_contrato
  • idx_grupos_permissoes_parent → parent
  • idx_grupos_permissoes_nivel → nivel
  • idx_grupos_contrato → id_contrato

wpjy_health_documents

  • id — bigint unsigned • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • customer_id — bigint unsigned • NOT NULL • MUL
  • uploader_id — bigint unsigned • NOT NULL • MUL
  • uploader_tipo — enum('cliente','profissional','admin','sistema') • NOT NULL
  • tipo — enum('laudo','exame','receita','atestado','outro') • NOT NULL • MUL
  • titulo — varchar(190) • NOT NULL
  • descricao — text
  • arquivo_path — varchar(255) • NOT NULL
  • arquivo_nome — varchar(190) • NOT NULL
  • arquivo_mime — varchar(120) • NOT NULL
  • arquivo_tamanho — bigint unsigned • NOT NULL
  • hash_sha1 — char(40)
  • data_documento — date
  • visibilidade — enum('cliente_profissional','somente_profissional','somente_cliente') • NOT NULL
  • status — enum('ativo','arquivado','excluido') • NOT NULL • MUL
  • created_at — datetime • NOT NULL • MUL
  • updated_at — datetime

Índices

  • PRIMARY → id
  • idx_contrato_cliente → id_contrato, customer_id
  • idx_cliente → customer_id
  • idx_uploader → uploader_id
  • idx_tipo → tipo
  • idx_status → status
  • idx_created_at → created_at

wpjy_integration_audit

  • id — bigint unsigned • NOT NULL • PRI
  • source — varchar(32) • NOT NULL • MUL
  • action — varchar(64) • NOT NULL
  • external_id — varchar(128) • MUL
  • corr_id — varchar(64) • MUL
  • status — enum('ok','fail') • NOT NULL
  • http_code — smallint unsigned
  • duration_ms — int unsigned
  • meta — json
  • error — text
  • created_at — datetime • NOT NULL • MUL

Índices

  • PRIMARY → id
  • idx_source_action → source, action
  • idx_created → created_at
  • idx_external → external_id
  • idx_corr → corr_id

wpjy_interesses

  • id — int • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • nome — varchar(255) • NOT NULL
  • descricao — text
  • categoria_id — int • MUL
  • especialidade_id — int • MUL
  • atuacao_id — int • MUL
  • ativo — tinyint(1)
  • data_criacao — datetime

Índices

  • PRIMARY → id
  • categoria_id → categoria_id
  • especialidade_id → especialidade_id
  • atuacao_id → atuacao_id
  • id_contrato → id_contrato

wpjy_interesses_vinculos

  • id — int • NOT NULL • PRI
  • parceiro_tipo — enum('empresa','profissional','cliente') • NOT NULL • MUL
  • parceiro_id — int • NOT NULL • MUL
  • interesse_id — int • NOT NULL • MUL
  • ativo — tinyint(1)

Índices

  • PRIMARY → id
  • parceiro_tipo → parceiro_tipo, parceiro_id, interesse_id
  • interesse_id → interesse_id
  • parceiro_id → parceiro_id

wpjy_kb_article_attachments

  • id — bigint unsigned • NOT NULL • PRI
  • article_id — bigint unsigned • NOT NULL • MUL
  • media_id — bigint unsigned • MUL
  • url — varchar(600)
  • titulo — varchar(220)
  • ordem — smallint unsigned • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_article → article_id
  • idx_media → media_id

wpjy_kb_article_comments

  • id — bigint unsigned • NOT NULL • PRI
  • article_id — bigint unsigned • NOT NULL • MUL
  • user_id — bigint unsigned • MUL
  • texto — text • NOT NULL
  • status — enum('visivel','oculto') • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_article → article_id
  • idx_user → user_id

wpjy_kb_article_feedback

  • id — bigint unsigned • NOT NULL • PRI
  • article_id — bigint unsigned • NOT NULL • MUL
  • user_id — bigint unsigned
  • helpful — tinyint(1) • NOT NULL • MUL
  • rating — tinyint unsigned
  • comentario — varchar(400)
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_user_vote → article_id, user_id
  • idx_article → article_id
  • idx_helpful → helpful

wpjy_kb_article_media

  • id — bigint unsigned • NOT NULL • PRI
  • article_id — bigint unsigned • NOT NULL • MUL
  • media_id — bigint unsigned • NOT NULL • MUL
  • kind — enum('cover','image','file','video','attachment') • NOT NULL
  • alt — varchar(255)
  • caption — varchar(255)
  • ordem — int unsigned • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_article → article_id
  • idx_media → media_id

wpjy_kb_article_tags

  • article_id — bigint unsigned • NOT NULL • PRI
  • tag_id — bigint unsigned • NOT NULL • PRI

Índices

  • PRIMARY → article_id, tag_id
  • idx_tag → tag_id

wpjy_kb_article_versions

  • id — bigint unsigned • NOT NULL • PRI
  • article_id — bigint unsigned • NOT NULL • MUL
  • numero — int unsigned • NOT NULL
  • autor_user_id — bigint unsigned
  • change_log — varchar(400)
  • corpo — longtext • NOT NULL • MUL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_art_ver → article_id, numero
  • idx_article → article_id
  • ft_ver_texto → corpo

wpjy_kb_article_views

  • id — bigint unsigned • NOT NULL • PRI
  • article_id — bigint unsigned • NOT NULL • MUL
  • user_id — bigint unsigned
  • fingerprint — varchar(64)
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_view_once → article_id, user_id, fingerprint
  • idx_article → article_id

wpjy_kb_articles

  • id — bigint unsigned • NOT NULL • PRI
  • space_id — bigint unsigned • NOT NULL • MUL
  • category_id — bigint unsigned • MUL
  • titulo — varchar(220) • NOT NULL • MUL
  • subtitulo — varchar(300)
  • slug — varchar(220) • NOT NULL
  • resumo — varchar(400)
  • corpo — longtext
  • status — enum('rascunho','revisao','publicado','arquivado') • NOT NULL • MUL
  • autor_user_id — bigint unsigned
  • revisor_user_id — bigint unsigned
  • locale — varchar(12) • NOT NULL
  • translate_group — bigint unsigned
  • pinned — tinyint(1) • NOT NULL
  • featured_media_id — bigint unsigned
  • tempo_leitura_min — smallint unsigned
  • tags_text — varchar(600)
  • views_cache — int unsigned • NOT NULL
  • helpful_cache — int unsigned • NOT NULL
  • not_helpful_cache — int unsigned • NOT NULL
  • published_at — datetime
  • created_at — datetime • NOT NULL
  • updated_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_art_slug → space_id, slug
  • idx_space → space_id
  • idx_cat → category_id
  • idx_status → status
  • ft_art_busca → titulo, subtitulo, corpo, tags_text

wpjy_kb_categories

  • id — bigint unsigned • NOT NULL • PRI
  • space_id — bigint unsigned • NOT NULL • MUL
  • parent_id — bigint unsigned • MUL
  • nome — varchar(160) • NOT NULL
  • slug — varchar(160) • NOT NULL
  • ordem — smallint unsigned • NOT NULL
  • path — varchar(600)
  • nivel — tinyint unsigned • NOT NULL
  • created_at — datetime • NOT NULL
  • updated_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_cat_slug → space_id, parent_id, slug
  • idx_space → space_id
  • idx_parent → parent_id

wpjy_kb_collection_items

  • collection_id — bigint unsigned • NOT NULL • PRI
  • article_id — bigint unsigned • NOT NULL • PRI
  • ordem — int unsigned • NOT NULL

Índices

  • PRIMARY → collection_id, article_id
  • idx_article → article_id

wpjy_kb_collections

  • id — bigint unsigned • NOT NULL • PRI
  • space_id — bigint unsigned • NOT NULL • MUL
  • slug — varchar(140) • NOT NULL
  • nome — varchar(160) • NOT NULL
  • descricao — text
  • is_featured — tinyint(1) • NOT NULL
  • created_by — bigint unsigned
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_coll_slug_space → space_id, slug
  • idx_space → space_id

wpjy_kb_favorites

  • user_id — bigint unsigned • NOT NULL • PRI
  • article_id — bigint unsigned • NOT NULL • PRI
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → user_id, article_id
  • idx_article → article_id

wpjy_kb_feedback

  • id — bigint unsigned • NOT NULL • PRI
  • article_id — bigint unsigned • NOT NULL • MUL
  • user_id — bigint unsigned • MUL
  • helpful — tinyint(1)
  • rating — tinyint unsigned
  • comentario — text
  • source — varchar(24)
  • ip — varbinary(16)
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_article → article_id
  • idx_user → user_id

wpjy_kb_goal_links

  • article_id — bigint unsigned • NOT NULL • PRI
  • meta_id — bigint unsigned • NOT NULL • PRI
  • rel_tipo — enum('contexto','evidencia','resultado') • NOT NULL

Índices

  • PRIMARY → article_id, meta_id
  • idx_meta → meta_id

wpjy_kb_permissions

  • id — bigint unsigned • NOT NULL • PRI
  • space_id — bigint unsigned • MUL
  • category_id — bigint unsigned
  • article_id — bigint unsigned
  • alvo_tipo — enum('role','user','equipe','contrato') • NOT NULL • MUL
  • alvo_id — varchar(120) • NOT NULL
  • permissao — enum('read','write','approve','admin') • NOT NULL
  • allow — tinyint(1) • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_scope → space_id, category_id, article_id
  • idx_target → alvo_tipo, alvo_id

wpjy_kb_redirects

  • id — bigint unsigned • NOT NULL • PRI
  • space_id — bigint unsigned • NOT NULL • MUL
  • from_slug — varchar(220) • NOT NULL
  • to_slug — varchar(220) • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_redirect → space_id, from_slug

wpjy_kb_relations

  • id — bigint unsigned • NOT NULL • PRI
  • article_id — bigint unsigned • NOT NULL • MUL
  • alvo_tipo — enum('tarefa','meta','procedimento','servico','outro') • NOT NULL • MUL
  • alvo_id — bigint unsigned • NOT NULL
  • rel_tipo — enum('relaciona','resolve','referencia','depende') • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_art_rel → article_id, alvo_tipo, alvo_id, rel_tipo
  • idx_article → article_id
  • idx_alvo → alvo_tipo, alvo_id

wpjy_kb_search_log

  • id — bigint unsigned • NOT NULL • PRI
  • space_id — bigint unsigned • MUL
  • user_id — bigint unsigned
  • q — varchar(255) • NOT NULL • MUL
  • results — int unsigned
  • created_at — datetime • NOT NULL • MUL

Índices

  • PRIMARY → id
  • idx_q → q
  • idx_space → space_id
  • idx_created → created_at

wpjy_kb_spaces

  • id — bigint unsigned • NOT NULL • PRI
  • id_contrato — int unsigned • MUL
  • nome — varchar(160) • NOT NULL
  • slug — varchar(160) • NOT NULL
  • descricao — text
  • visibilidade — enum('privada','equipe','contrato','publica') • NOT NULL • MUL
  • ordem — smallint unsigned • NOT NULL
  • created_at — datetime • NOT NULL
  • updated_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_space_slug → id_contrato, slug
  • idx_contrato → id_contrato
  • idx_vis → visibilidade

wpjy_kb_synonyms

  • id — bigint unsigned • NOT NULL • PRI
  • term — varchar(120) • NOT NULL • MUL
  • synonyms — varchar(500) • NOT NULL
  • lang — varchar(10)

Índices

  • PRIMARY → id
  • uq_term_lang → term, lang

wpjy_kb_tags

  • id — bigint unsigned • NOT NULL • PRI
  • nome — varchar(100) • NOT NULL • MUL
  • slug — varchar(120) • NOT NULL • UNI

Índices

  • PRIMARY → id
  • uq_tag_slug → slug
  • idx_nome → nome

wpjy_kb_task_links

  • article_id — bigint unsigned • NOT NULL • PRI
  • tarefa_id — bigint unsigned • NOT NULL • PRI
  • rel_tipo — enum('relaciona','implementa','depende') • NOT NULL

Índices

  • PRIMARY → article_id, tarefa_id
  • idx_tarefa → tarefa_id

wpjy_kb_versions

  • id — bigint unsigned • NOT NULL • PRI
  • article_id — bigint unsigned • NOT NULL • MUL
  • version_no — int unsigned • NOT NULL
  • titulo — varchar(255) • NOT NULL
  • resumo — text
  • corpo — longtext
  • change_note — varchar(255)
  • editor_user_id — bigint unsigned
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_art_ver → article_id, version_no
  • idx_article → article_id

wpjy_kb_views

  • id — bigint unsigned • NOT NULL • PRI
  • article_id — bigint unsigned • NOT NULL • MUL
  • user_id — bigint unsigned • MUL
  • session_id — varchar(64)
  • referrer — varchar(255)
  • created_at — datetime • NOT NULL • MUL

Índices

  • PRIMARY → id
  • idx_article → article_id
  • idx_user → user_id
  • idx_created → created_at

wpjy_kb_watchers

  • id — bigint unsigned • NOT NULL • PRI
  • article_id — bigint unsigned • NOT NULL • MUL
  • user_id — bigint unsigned • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_watch → article_id, user_id

wpjy_kit

  • id — int • NOT NULL • PRI
  • id_assinatura — int • MUL
  • dataini — date
  • datafim — date
  • anexo — text
  • rastreio — text
  • created_at — datetime

Índices

  • PRIMARY → id
  • id_assinatura → id_assinatura
  • idx_kit_assinatura_id → id_assinatura, id

wpjy_leads

  • id — int unsigned • NOT NULL • PRI
  • nome — varchar(250)
  • email — varchar(100) • NOT NULL • MUL
  • whatsapp — varchar(50)
  • cpf — varchar(20) • MUL
  • divulgador — int • MUL
  • src — varchar(50) • MUL
  • atendimento — varchar(20) • MUL
  • score — int
  • score_manual — int
  • score_sistema — int
  • next_action_at — datetime • MUL
  • last_activity_at — datetime
  • atendimento_inicio — datetime
  • atendimento_fim — datetime
  • cliente — tinyint(1) • NOT NULL
  • atendente — int • MUL
  • visita — int
  • contrato — int • MUL
  • data_cadastro — datetime • NOT NULL
  • user_id — int • MUL
  • avaliacao — varchar(50)
  • motivo_id — bigint unsigned • MUL
  • motivo_obs — varchar(255)

Índices

  • PRIMARY → id
  • idx_email → email
  • idx_cpf → cpf
  • idx_status → atendimento
  • idx_contrato → contrato
  • idx_user → user_id
  • idx_contrato_status_data → contrato, atendimento, data_cadastro
  • idx_atendente_status_data → atendente, atendimento, data_cadastro
  • idx_divulgador → divulgador
  • idx_src → src
  • idx_next_action → next_action_at
  • idx_contrato_status_next → contrato, atendimento, next_action_at
  • idx_contrato_src → contrato, src
  • idx_contrato_divulgador → contrato, divulgador
  • idx_motivo_id → motivo_id
  • idx_contrato_last_activity → contrato, last_activity_at

wpjy_leads_convites

  • id — bigint unsigned • NOT NULL • PRI
  • id_lead — bigint unsigned • NOT NULL • MUL
  • token — char(32) • NOT NULL • UNI
  • status — enum('pendente','enviado','aceito','expirado','cancelado') • NOT NULL • MUL
  • sent_at — datetime
  • accepted_at — datetime
  • expires_at — datetime
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_token → token
  • idx_lead → id_lead
  • idx_status → status

wpjy_leads_events

  • id — bigint unsigned • NOT NULL • PRI
  • lead_id — bigint unsigned • NOT NULL • MUL
  • author_id — bigint unsigned
  • tipo — varchar(50) • NOT NULL • MUL
  • payload — json
  • descricao — text • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_lead_created → lead_id, created_at
  • idx_tipo → tipo

wpjy_leads_imports

  • id — bigint unsigned • NOT NULL • PRI
  • id_profissional — bigint unsigned • NOT NULL • MUL
  • nome_lote — varchar(120) • NOT NULL
  • status — enum('preview','aprovado','processando','concluido','erro') • NOT NULL
  • total — int unsigned • NOT NULL
  • criados — int unsigned • NOT NULL
  • vinculados — int unsigned • NOT NULL
  • ignorados — int unsigned • NOT NULL
  • arquivo — varchar(255)
  • log — text
  • created_at — datetime • NOT NULL
  • updated_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_prof → id_profissional

wpjy_leads_imports_itens

  • id — bigint unsigned • NOT NULL • PRI
  • import_id — bigint unsigned • NOT NULL • MUL
  • raw_row — json • NOT NULL
  • match_user_id — bigint unsigned
  • match_lead_id — bigint unsigned
  • status — enum('novo','vincular','ignorar','erro') • NOT NULL • MUL
  • motivo — varchar(255)
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_imp → import_id
  • idx_status → status

wpjy_leads_motivos

  • id — bigint unsigned • NOT NULL • PRI
  • contrato — bigint unsigned • NOT NULL • MUL
  • tipo — enum('perda','desinteresse','invalido','ganho') • NOT NULL
  • nome — varchar(120) • NOT NULL
  • ativo — tinyint(1) • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_contrato_tipo → contrato, tipo

wpjy_leads_notas

  • id — bigint unsigned • NOT NULL • PRI
  • id_lead — bigint unsigned • NOT NULL • MUL
  • author_id — bigint unsigned
  • tipo — enum('nota','ligacao','whatsapp','email','reuniao','outro') • NOT NULL • MUL
  • conteudo — text • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_lead → id_lead
  • idx_tipo → tipo

wpjy_leads_origens

  • id — bigint unsigned • NOT NULL • PRI
  • contrato — bigint unsigned • NOT NULL • MUL
  • nome — varchar(120) • NOT NULL
  • cor — varchar(20)
  • ativo — tinyint(1) • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_contrato_nome → contrato, nome
  • idx_contrato_ativo → contrato, ativo

wpjy_leads_prefs

  • id_lead — bigint unsigned • NOT NULL • PRI
  • modalidade — enum('presencial','domicilio','online')
  • endereco_id — bigint unsigned • MUL
  • servico_id — bigint unsigned • MUL
  • procedimento_id — bigint unsigned • MUL
  • obs — varchar(255)
  • updated_at — datetime • NOT NULL

Índices

  • PRIMARY → id_lead
  • idx_end → endereco_id
  • idx_serv → servico_id
  • idx_proc → procedimento_id

wpjy_leads_tag_map

  • lead_id — bigint unsigned • NOT NULL • PRI
  • tag_id — bigint unsigned • NOT NULL • PRI

Índices

  • PRIMARY → lead_id, tag_id
  • idx_tag → tag_id

wpjy_leads_tags

  • id — bigint unsigned • NOT NULL • PRI
  • contrato — bigint unsigned • NOT NULL • MUL
  • nome — varchar(80) • NOT NULL
  • cor — varchar(20)
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_contrato_nome → contrato, nome

wpjy_leads_tasks

  • id — bigint unsigned • NOT NULL • PRI
  • lead_id — bigint unsigned • NOT NULL • MUL
  • user_id — bigint unsigned • MUL
  • tipo — enum('ligacao','whatsapp','email','reuniao','retorno','outro') • NOT NULL
  • titulo — varchar(150) • NOT NULL
  • descricao — text
  • status — enum('pendente','concluida','cancelada') • NOT NULL • MUL
  • due_at — datetime
  • done_at — datetime
  • created_at — datetime • NOT NULL
  • updated_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_lead → lead_id
  • idx_status_due → status, due_at
  • idx_user_status_due → user_id, status, due_at

wpjy_links

  • link_id — bigint unsigned • NOT NULL • PRI
  • link_url — varchar(255) • NOT NULL
  • link_name — varchar(255) • NOT NULL
  • link_image — varchar(255) • NOT NULL
  • link_target — varchar(25) • NOT NULL
  • link_description — varchar(255) • NOT NULL
  • link_visible — varchar(20) • NOT NULL • MUL
  • link_owner — bigint unsigned • NOT NULL
  • link_rating — int • NOT NULL
  • link_updated — datetime • NOT NULL
  • link_rel — varchar(255) • NOT NULL
  • link_notes — mediumtext • NOT NULL
  • link_rss — varchar(255) • NOT NULL

Índices

  • PRIMARY → link_id
  • link_visible → link_visible

wpjy_log

  • id — int • NOT NULL • PRI
  • user_id — int • MUL
  • data_cad — datetime • NOT NULL • MUL
  • alteracoes — text
  • tb — varchar(100) • MUL
  • registro_id — int • MUL
  • funcao — varchar(50) • MUL
  • url — varchar(255)
  • ip — varchar(45)
  • user_agent — varchar(255)

Índices

  • PRIMARY → id
  • user_id → user_id
  • registro_id → registro_id
  • idx_tb → tb
  • idx_data_cad → data_cad
  • idx_tb_registro → tb, registro_id
  • idx_log_tb_registro → tb, registro_id
  • idx_log_user_data → user_id, data_cad
  • idx_log_user_date → user_id, data_cad
  • idx_log_tb_reg_date → tb, registro_id, data_cad
  • idx_log_func_date → funcao, data_cad

wpjy_log_api

  • id — int • NOT NULL • PRI
  • data — datetime
  • ip — varchar(45)
  • classe — varchar(100)
  • metodo — varchar(100)
  • status — int
  • mensagem — text
  • parametros — longtext
  • contrato_id — int
  • user_agent — text

Índices

  • PRIMARY → id

wpjy_log_erros

  • id — int • NOT NULL • PRI
  • evento — varchar(20) • NOT NULL
  • data_evento — datetime • NOT NULL
  • erro — text • NOT NULL
  • tabela — varchar(50) • NOT NULL
  • last_query — text
  • dados — text

Índices

  • PRIMARY → id

wpjy_mail_events

  • id — bigint unsigned • NOT NULL • PRI
  • provider — varchar(32) • NOT NULL • MUL
  • provider_event_id — varchar(128)
  • event_type — enum('delivered','bounce','complaint','open','click','dropped') • NOT NULL • MUL
  • message_id — varchar(255) • MUL
  • recipient — varchar(190) • MUL
  • reason — varchar(255)
  • bounce_type — varchar(64)
  • raw_payload — json
  • event_at — datetime • NOT NULL • MUL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_provider_event → provider, provider_event_id
  • idx_event_type → event_type
  • idx_message_id → message_id
  • idx_recipient → recipient
  • idx_event_at → event_at

wpjy_mail_suppressions

  • id — bigint unsigned • NOT NULL • PRI
  • email — varchar(190) • NOT NULL • UNI
  • reason — varchar(255)
  • source — enum('webhook','manual','import') • NOT NULL
  • suppressed_until — datetime • MUL
  • created_at — datetime • NOT NULL
  • updated_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_email → email
  • idx_until → suppressed_until

wpjy_mailbox_account_users

  • account_id — bigint unsigned • NOT NULL • PRI
  • user_id — bigint unsigned • NOT NULL • PRI

Índices

  • PRIMARY → account_id, user_id
  • idx_user → user_id

wpjy_mailbox_accounts

  • id — bigint unsigned • NOT NULL • PRI
  • id_contrato — int unsigned • MUL
  • label — varchar(120) • NOT NULL
  • email — varchar(190) • NOT NULL • MUL
  • imap_host — varchar(190) • NOT NULL
  • imap_port — smallint unsigned • NOT NULL
  • imap_tls — tinyint(1) • NOT NULL
  • smtp_host — varchar(190) • NOT NULL
  • smtp_port — smallint unsigned • NOT NULL
  • smtp_tls — tinyint(1) • NOT NULL
  • username — varchar(190) • NOT NULL
  • password — text • NOT NULL
  • active — tinyint(1) • NOT NULL • MUL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_email_contrato → email, id_contrato
  • idx_contrato → id_contrato
  • idx_active → active

wpjy_mailbox_attachments

  • id — bigint unsigned • NOT NULL • PRI
  • message_id — bigint unsigned • NOT NULL • MUL
  • filename — varchar(255) • NOT NULL
  • mime — varchar(120)
  • size — bigint unsigned
  • storage_path — varchar(512)
  • storage_url — varchar(1024)

Índices

  • PRIMARY → id
  • idx_msg → message_id

wpjy_mailbox_folders

  • id — bigint unsigned • NOT NULL • PRI
  • account_id — bigint unsigned • NOT NULL • MUL
  • name — varchar(120) • NOT NULL
  • last_uid — bigint unsigned
  • uidvalidity — bigint unsigned
  • highestmodseq — bigint unsigned

Índices

  • PRIMARY → id
  • uq_acc_folder → account_id, name
  • idx_acc → account_id
  • idx_acc_name_lastuid → account_id, name, last_uid
  • idx_acc_name_uidval → account_id, name, uidvalidity

wpjy_mailbox_labels

  • id — bigint unsigned • NOT NULL • PRI
  • account_id — bigint unsigned • NOT NULL • MUL
  • name — varchar(120) • NOT NULL
  • color — varchar(16)
  • system — enum('starred','important','custom') • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_account_label → account_id, name
  • idx_account → account_id

wpjy_mailbox_message_labels

  • message_id — bigint unsigned • NOT NULL • PRI
  • label_id — bigint unsigned • NOT NULL • PRI

Índices

  • PRIMARY → message_id, label_id
  • idx_label → label_id

wpjy_mailbox_messages

  • id — bigint unsigned • NOT NULL • PRI
  • thread_id — bigint unsigned • NOT NULL • MUL
  • uid — bigint unsigned • MUL
  • message_id — varchar(255) • UNI
  • in_reply_to — varchar(255)
  • from_addr — varchar(255)
  • to_addr — text
  • cc_addr — text
  • bcc_addr — text
  • subject — varchar(255) • MUL
  • sent_at — datetime • MUL
  • flags — varchar(255)
  • size — bigint unsigned
  • text_plain — longtext
  • text_html — longtext
  • from_me — tinyint(1) • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_thread_uid → thread_id, uid
  • uq_message_id → message_id
  • idx_thread → thread_id
  • idx_thread_id → thread_id, id
  • idx_uid → uid
  • idx_sent_at → sent_at
  • ft_subject_body → subject, text_plain, text_html

wpjy_mailbox_threads

  • id — bigint unsigned • NOT NULL • PRI
  • id_contrato — int unsigned
  • account_id — bigint unsigned • NOT NULL • MUL
  • folder — varchar(120) • NOT NULL
  • thread_hash — varchar(64) • NOT NULL
  • subject — varchar(255)
  • last_msg_id — bigint unsigned • MUL
  • last_at — datetime • MUL

Índices

  • PRIMARY → id
  • uq_thread → account_id, folder, thread_hash
  • idx_acc_folder → account_id, folder
  • idx_last_at → last_at
  • idx_last_msg_id → last_msg_id
  • idx_acc_folder_lastat → account_id, folder, last_at

wpjy_mailbox_threads_user

  • id — bigint unsigned • NOT NULL • PRI
  • thread_id — bigint unsigned • NOT NULL • MUL
  • user_id — bigint unsigned • NOT NULL • MUL
  • last_seen_msg — bigint unsigned • MUL
  • last_seen_at — datetime
  • starred — tinyint(1) • NOT NULL
  • important — tinyint(1) • NOT NULL
  • muted — tinyint(1) • NOT NULL
  • archived — tinyint(1) • NOT NULL
  • deleted — tinyint(1) • NOT NULL
  • snooze_until — datetime

Índices

  • PRIMARY → id
  • uq_thread_user → thread_id, user_id
  • idx_user → user_id
  • idx_last_seen_msg → last_seen_msg
  • idx_user_star → user_id, starred
  • idx_user_imp → user_id, important
  • idx_user_arch → user_id, archived
  • idx_user_del → user_id, deleted
  • idx_user_snooze → user_id, snooze_until

wpjy_media

  • id — bigint unsigned • NOT NULL • PRI
  • filename — varchar(255) • NOT NULL
  • rel_path — varchar(255) • NOT NULL
  • folder — varchar(255) • MUL
  • url — varchar(500) • NOT NULL
  • thumb_url — varchar(500)
  • mime — varchar(100) • NOT NULL • MUL
  • ext — varchar(10) • NOT NULL
  • size — bigint unsigned • NOT NULL
  • hash_sha1 — char(40) • MUL
  • width — int
  • height — int
  • id_contrato — bigint • MUL
  • uploader_id — bigint
  • is_public — tinyint(1) • NOT NULL • MUL
  • created_at — datetime • MUL
  • updated_at — datetime
  • deleted_at — datetime • MUL

Índices

  • PRIMARY → id
  • uq_contrato_path_name → id_contrato, rel_path, filename
  • mime → mime
  • created_at → created_at
  • contrato_id → id_contrato
  • id_contrato → id_contrato
  • idx_folder → folder
  • idx_public → is_public
  • idx_deleted_at → deleted_at
  • idx_hash → hash_sha1

wpjy_media_meta

  • id — bigint unsigned • NOT NULL • PRI
  • media_id — bigint unsigned • NOT NULL • MUL
  • mkey — varchar(120) • NOT NULL
  • mvalue — longtext
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_media_key → media_id, mkey
  • idx_media → media_id

wpjy_media_tags

  • id — bigint unsigned • NOT NULL • PRI
  • media_id — bigint unsigned • NOT NULL • MUL
  • tag — varchar(80) • NOT NULL • MUL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_media_tag → media_id, tag
  • idx_tag → tag

wpjy_media_versions

  • id — bigint unsigned • NOT NULL • PRI
  • media_id — bigint unsigned • NOT NULL • MUL
  • filename_old — varchar(255) • NOT NULL
  • rel_path_old — varchar(255) • NOT NULL
  • url_old — varchar(500) • NOT NULL
  • mime_old — varchar(100) • NOT NULL
  • size_old — bigint unsigned • NOT NULL
  • hash_sha1 — char(40)
  • note — varchar(255)
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_media → media_id

wpjy_mensagens_predefinidas

  • id — int • NOT NULL • PRI
  • id_contrato — int • NOT NULL
  • tipo — varchar(20)
  • titulo — longtext • NOT NULL
  • mensagem — longtext • NOT NULL
  • midia — text
  • data_cad — datetime

Índices

  • PRIMARY → id

wpjy_menus

  • id — int unsigned • NOT NULL • PRI
  • name — varchar(200) • NOT NULL
  • position — text

Índices

  • PRIMARY → id

wpjy_menus_backup

  • id — int unsigned • NOT NULL • PRI
  • menu_id — int unsigned • NOT NULL
  • json — text • NOT NULL
  • created_at — datetime • NOT NULL
  • created_by — bigint unsigned
  • note — varchar(255)

Índices

  • PRIMARY → id

wpjy_menus_items

  • id — int unsigned • NOT NULL • PRI
  • label — varchar(200) • NOT NULL
  • link — varchar(100) • NOT NULL
  • area — varchar(20)
  • parent — int unsigned • NOT NULL • MUL
  • sort — int unsigned • NOT NULL
  • menu — int unsigned • NOT NULL • MUL
  • target — varchar(25)
  • icon — varchar(50)
  • slug — varchar(100) • MUL
  • tag — varchar(50) • MUL
  • parametro_url — varchar(200)

Índices

  • PRIMARY → id
  • idx_menu_parent_sort → menu, parent, sort
  • idx_menu_sort → menu, sort
  • idx_parent → parent
  • idx_slug → slug
  • idx_menu_area_parent_sort → menu, area, parent, sort
  • idx_tag → tag

wpjy_metas

  • id — bigint unsigned • NOT NULL • PRI
  • id_contrato — int • MUL
  • titulo — varchar(255) • NOT NULL
  • descricao — text
  • tipo — enum('custom','receita','vendas','clientes','retencao','tarefas_concluidas') • NOT NULL
  • unidade — enum('valor','quantidade','percentual') • NOT NULL
  • periodicidade — enum('mensal','trimestral','semestral','anual','livre') • NOT NULL
  • dt_inicio — date • NOT NULL • MUL
  • dt_fim — date • NOT NULL
  • baseline — decimal(15,4)
  • alvo — decimal(15,4) • NOT NULL
  • status — enum('ativa','pausada','encerrada','cancelada') • NOT NULL • MUL
  • responsavel_tipo — enum('usuario','equipe','profissional','empresa','contrato') • NOT NULL • MUL
  • responsavel_id — bigint unsigned • NOT NULL
  • calc_mode — enum('tarefas','datasources','misto') • NOT NULL
  • peso_tarefas — decimal(5,2) • NOT NULL
  • peso_ds — decimal(5,2) • NOT NULL
  • kpi_direction — enum('up','down') • NOT NULL
  • target_green — decimal(15,4)
  • target_yellow — decimal(15,4)
  • expected_mode — enum('linear','step','flat') • NOT NULL
  • progress_cache — decimal(7,3)
  • updated_progress_at — datetime
  • created_at — datetime • NOT NULL
  • updated_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_meta_contrato → id_contrato
  • idx_meta_periodo → dt_inicio, dt_fim
  • idx_meta_status → status
  • idx_meta_owner → responsavel_tipo, responsavel_id

wpjy_metas_alert_log

  • id — bigint unsigned • NOT NULL • PRI
  • id_meta — bigint unsigned • NOT NULL • MUL
  • alert_id — bigint unsigned • MUL
  • fired_at — datetime • NOT NULL
  • severity — enum('info','warn','crit') • NOT NULL
  • message — varchar(500)
  • payload — json

Índices

  • PRIMARY → id
  • fk_meta_alertlog_meta → id_meta
  • fk_meta_alertlog_alert → alert_id

wpjy_metas_alerts

  • id — bigint unsigned • NOT NULL • PRI
  • id_meta — bigint unsigned • NOT NULL • MUL
  • policy — enum('threshold','trend','deadline','inactivity') • NOT NULL
  • params_json — json • NOT NULL
  • channels — set('inapp','email','whatsapp','webhook') • NOT NULL
  • recipients_json — json
  • enabled — tinyint(1) • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • fk_meta_alert_meta → id_meta

wpjy_metas_context

  • id — bigint unsigned • NOT NULL • PRI
  • id_meta — bigint unsigned • NOT NULL • MUL
  • id_contrato — int
  • equipe_id — int
  • profissao — varchar(80)
  • uf — char(2)
  • canal — varchar(40)

Índices

  • PRIMARY → id
  • uq_ctx → id_meta, id_contrato, equipe_id, profissao, uf, canal

wpjy_metas_datasources

  • id — bigint unsigned • NOT NULL • PRI
  • id_meta — bigint unsigned • NOT NULL • MUL
  • tipo — enum('sql','table_counter','table_sum','ratio','duration') • NOT NULL
  • sql_text — text
  • sql_hash — char(32)
  • base — enum('daily','weekly','monthly','cumulative') • NOT NULL
  • filtro_json — json
  • peso — decimal(8,3) • NOT NULL

Índices

  • PRIMARY → id
  • uq_meta_ds → id_meta, tipo, sql_hash

wpjy_metas_participantes

  • id — bigint unsigned • NOT NULL • PRI
  • id_meta — bigint unsigned • NOT NULL • MUL
  • alvo_tipo — enum('usuario','equipe','profissional','empresa','contrato') • NOT NULL
  • alvo_id — bigint unsigned • NOT NULL
  • papel — enum('owner','contribuidor','viewer') • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_meta_part → id_meta, alvo_tipo, alvo_id

wpjy_metas_registros

  • id — bigint unsigned • NOT NULL • PRI
  • id_meta — bigint unsigned • NOT NULL • MUL
  • data_ref — date • NOT NULL
  • valor — decimal(14,2) • NOT NULL
  • origem — varchar(40)
  • obs — varchar(255)
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_meta_data → id_meta, data_ref

wpjy_metas_relations

  • id — bigint unsigned • NOT NULL • PRI
  • id_meta — bigint unsigned • NOT NULL • MUL
  • alvo_tipo — enum('tarefa','lead','atendimento','ticket','profissional','assinatura','fatura','agenda','kb','custom') • NOT NULL
  • alvo_id — bigint unsigned
  • filtro_json — json
  • peso — decimal(8,3) • NOT NULL

Índices

  • PRIMARY → id
  • uq_meta_alvo → id_meta, alvo_tipo, alvo_id

wpjy_metas_snapshot

  • id — bigint unsigned • NOT NULL • PRI
  • id_meta — bigint unsigned • NOT NULL • MUL
  • data_ref — date • NOT NULL
  • valor — decimal(15,4) • NOT NULL
  • fonte — varchar(120)
  • observacao — varchar(255)
  • created_by — bigint unsigned
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_meta_data_fonte → id_meta, data_ref, fonte

wpjy_metas_tarefas

  • id_meta — bigint unsigned • NOT NULL • PRI
  • id_tarefa — bigint unsigned • NOT NULL • PRI
  • peso — decimal(8,3) • NOT NULL
  • obrigatoria — tinyint(1) • NOT NULL

Índices

  • PRIMARY → id_meta, id_tarefa
  • idx_meta_tarefa_tarefa → id_tarefa

wpjy_mgmlp_folders

  • post_id — bigint • NOT NULL • PRI
  • folder_id — bigint • NOT NULL

Índices

  • PRIMARY → post_id

wpjy_notifications

  • id — int • NOT NULL • PRI
  • tipo — enum('notificacao','mp') • NOT NULL
  • title — varchar(250) • NOT NULL
  • message — text • NOT NULL
  • ntime — datetime
  • repeat — int
  • nloop — int • NOT NULL
  • publish_date — timestamp • NOT NULL
  • user — int • NOT NULL
  • contrato — int
  • plano — int
  • icon — mediumtext
  • image — mediumtext
  • url — tinytext
  • status — tinyint(1)

Índices

  • PRIMARY → id

wpjy_onboarding_events

  • id — bigint unsigned • NOT NULL • PRI
  • session_id — bigint unsigned • NOT NULL • MUL
  • step — tinyint unsigned • NOT NULL
  • event — enum('step_enter','step_submit','step_error','complete') • NOT NULL
  • status — enum('ok','error') • NOT NULL
  • meta_json — json
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_onb_evt_session_step → session_id, step, event

wpjy_onboarding_sessions

  • id — bigint unsigned • NOT NULL • PRI
  • id_contrato — int • MUL
  • tipo — enum('profissional','cliente') • NOT NULL
  • user_id — bigint unsigned
  • profissional_id — bigint unsigned
  • fp — varchar(64) • MUL
  • device_type — varchar(20)
  • source — varchar(50)
  • campaign — varchar(50)
  • status — enum('in_progress','completed','abandoned') • NOT NULL • MUL
  • current_step — tinyint unsigned
  • created_at — datetime • NOT NULL
  • updated_at — datetime • NOT NULL
  • completed_at — datetime

Índices

  • PRIMARY → id
  • idx_onb_contrato_tipo → id_contrato, tipo
  • idx_onb_fp → fp
  • idx_onb_status → status, current_step

wpjy_options

  • option_id — bigint unsigned • NOT NULL • PRI
  • option_name — varchar(191) • NOT NULL • UNI
  • option_value — longtext • NOT NULL
  • autoload — varchar(20) • NOT NULL • MUL

Índices

  • PRIMARY → option_id
  • option_name → option_name
  • autoload → autoload

wpjy_pagamentos

  • id — int • NOT NULL • PRI
  • id_cadastro — int • MUL
  • data_cad — datetime
  • mes — int
  • ano — int
  • data_vencimento — date
  • status — varchar(45)

Índices

  • PRIMARY → id
  • ID_CADASTRO → id_cadastro

wpjy_pagamentos_plataforma

  • id — int • NOT NULL • PRI
  • id_pagamento — int • MUL
  • id_plataforma — varchar(45)
  • boleto_url — text
  • lixeira — tinyint

Índices

  • PRIMARY → id
  • id_pagamento → id_pagamento

wpjy_parametros

  • id — int • NOT NULL • PRI
  • nome — varchar(50) • NOT NULL • MUL
  • valor — varchar(250)

Índices

  • PRIMARY → id
  • nome → nome

wpjy_parceiros_agenda_atendimentos

  • id — int • NOT NULL • PRI
  • empresa_id — int • NOT NULL • MUL
  • profissional_id — int • NOT NULL • MUL
  • data_atendimento — datetime • NOT NULL
  • status — enum('agendado','concluido','cancelado') • NOT NULL

Índices

  • PRIMARY → id
  • idx_at_empresa → empresa_id
  • idx_at_profissional → profissional_id

wpjy_parceiros_atendimentos

  • id — int • NOT NULL • PRI
  • id_contrato — int • MUL
  • user_id — int • MUL
  • cliente_id — int • MUL
  • lead_id — int • MUL
  • assunto — varchar(150)
  • texto — text • NOT NULL
  • anexo — text
  • anexo_id — bigint unsigned • MUL
  • data_criacao — datetime • NOT NULL • MUL
  • updated_at — datetime
  • usuario — int • NOT NULL • MUL
  • assigned_to — int • MUL
  • tipo — varchar(50)
  • meio — varchar(50) • MUL
  • atendimento_pai — int
  • status — varchar(50) • MUL
  • nota — varchar(50)
  • empresa_id — int • MUL
  • profissional_id — int • MUL
  • corretora_id — int • MUL

Índices

  • PRIMARY → id
  • user_id → user_id
  • usuario → usuario
  • lead_id → lead_id
  • empresa_id → empresa_id
  • profissional_id → profissional_id
  • idx_atends_meio → meio
  • idx_atends_status → status
  • idx_atends_criacao → data_criacao
  • idx_atends_cliente → cliente_id
  • idx_anexo_id → anexo_id
  • idx_att_cliente_data → cliente_id, atendimento_pai, data_criacao
  • idx_att_prof_data → profissional_id, atendimento_pai, data_criacao
  • idx_att_status_data → status, data_criacao
  • idx_att_contrato_status_data → id_contrato, status, data_criacao
  • idx_att_assigned_data → assigned_to, data_criacao
  • idx_att_corretora → corretora_id

wpjy_parceiros_atendimentos_docs

  • id — bigint unsigned • NOT NULL • PRI
  • appointment_id — bigint unsigned • NOT NULL • MUL
  • id_profissional — bigint unsigned • NOT NULL
  • user_id — bigint unsigned
  • tipo — varchar(50) • NOT NULL
  • titulo — varchar(190) • NOT NULL
  • arquivo — varchar(255) • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_app → appointment_id, id_profissional

wpjy_parceiros_atuacoes

  • id — int • NOT NULL • PRI
  • especialidade_id — int • NOT NULL • MUL
  • id_contrato — int • NOT NULL • MUL
  • nome — varchar(255) • NOT NULL
  • descricao — mediumtext • NOT NULL
  • imagem — varchar(255)
  • parent_id — int • MUL

Índices

  • PRIMARY → id
  • parent_id → parent_id
  • fk_atuacao_especialidade → especialidade_id
  • idx_atu_busca → id_contrato, especialidade_id, parent_id
  • idx_atu_contrato_nome → id_contrato, nome
  • idx_atu_contrato_espec_nome → id_contrato, especialidade_id, nome

wpjy_parceiros_categorias

  • id — int • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • nome — varchar(100) • NOT NULL
  • descricao — mediumtext
  • imagem — varchar(255)
  • tipo — enum('empresa','profissional','corretora','cliente')
  • parent_id — int • MUL

Índices

  • PRIMARY → id
  • uq_cat_id_contrato → id, id_contrato
  • parent_id → parent_id
  • id_contrato → id_contrato
  • idx_cat_contrato_tipo → id_contrato, tipo
  • idx_cat_contrato_nome → id_contrato, nome

wpjy_parceiros_categorias_tipos

  • id — int • NOT NULL • PRI
  • categoria_id — int • NOT NULL • MUL
  • tipo — enum('empresa','profissional','corretora','cliente') • NOT NULL • MUL

Índices

  • PRIMARY → id
  • uq_categoria_tipo → categoria_id, tipo
  • idx_tipo → tipo
  • idx_cat_tipo_tipo → tipo

wpjy_parceiros_classificacoes

  • id — int • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • nome — varchar(100) • NOT NULL
  • descricao — text
  • percentual_repassado — decimal(5,2) • NOT NULL
  • cor — varchar(20)
  • ativo — tinyint(1)
  • data_criacao — datetime

Índices

  • PRIMARY → id
  • id_contrato → id_contrato

wpjy_parceiros_contatos

  • id — int • NOT NULL • PRI
  • parceiro_tipo — enum('profissional','empresa') • NOT NULL • MUL
  • parceiro_id — int • NOT NULL
  • endereco_id — int • MUL
  • tipo — enum('telefone','whatsapp','email','site','instagram','facebook','youtube','linkedin','outro') • NOT NULL • MUL
  • rotulo — varchar(50)
  • valor — varchar(255) • NOT NULL
  • is_principal — tinyint(1) • NOT NULL
  • ativo — tinyint(1) • NOT NULL
  • ordem — int • NOT NULL
  • data_criacao — datetime

Índices

  • PRIMARY → id
  • idx_pc_parc → parceiro_tipo, parceiro_id
  • idx_pc_tipo → tipo, ativo
  • idx_pc_end → endereco_id
  • idx_pc_ordem → parceiro_tipo, parceiro_id, is_principal, ordem

wpjy_parceiros_convenios_saude

  • id — bigint unsigned • NOT NULL • PRI
  • id_contrato — bigint unsigned • NOT NULL • MUL
  • tipo — varchar(20) • NOT NULL • MUL
  • convenio_id — bigint unsigned • MUL
  • nome — varchar(255) • NOT NULL
  • imagem — varchar(255)
  • codigo_operadora — varchar(64)
  • codigo_plano — varchar(64)
  • registro_ans — varchar(32)
  • segmentacao — varchar(64)
  • abrangencia — varchar(64)
  • acomodacao — varchar(64)
  • ativo — tinyint(1) • NOT NULL
  • ordem — int unsigned • NOT NULL
  • data_criacao — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_contrato → id_contrato
  • idx_tipo → tipo
  • idx_contrato_tipo → id_contrato, tipo
  • idx_convenio → convenio_id
  • idx_contrato_convenio → id_contrato, convenio_id

wpjy_parceiros_corretoras

  • id — int • NOT NULL • PRI
  • id_contrato — int • NOT NULL
  • razao_social — varchar(255) • NOT NULL
  • nome_fantasia — varchar(255)
  • cnpj — varchar(18) • NOT NULL
  • logo — varchar(255)
  • documento — varchar(255)
  • site — varchar(255)
  • facebook — varchar(255)
  • instagram — varchar(255)
  • youtube — varchar(255)
  • linkedin — varchar(255)
  • telefone — varchar(20)
  • email — varchar(255)
  • nome_responsavel — varchar(255)
  • cpf_responsavel — varchar(14)
  • telefone_responsavel — varchar(20)
  • desconto_min — decimal(5,2)
  • desconto_max — decimal(5,2)
  • descricao — text
  • categoria_id — int
  • avaliacao — varchar(255)
  • termos_aceitos — tinyint(1)
  • created_at — datetime
  • logradouro — varchar(255)
  • numero — varchar(20)
  • complemento — varchar(100)
  • bairro — varchar(100)
  • cidade — varchar(100)
  • estado — char(2)
  • cep — varchar(10)
  • status — varchar(20)
  • latitude — decimal(10,8)
  • longitude — decimal(11,8)
  • user_id — int
  • data_criacao — datetime

Índices

  • PRIMARY → id

wpjy_parceiros_corretoras_cnaes

  • id — int • NOT NULL • PRI
  • id_corretora — int • NOT NULL • MUL
  • id_cnae_subclasse — varchar(7) • NOT NULL • MUL
  • principal — tinyint(1)

Índices

  • PRIMARY → id
  • id_corretora → id_corretora
  • id_cnae_subclasse → id_cnae_subclasse

wpjy_parceiros_dados

  • id — int • NOT NULL • PRI
  • entidade — enum('empresa','profissional','cliente','lead') • NOT NULL • MUL
  • entidade_id — int • NOT NULL
  • categoria_id — int • NOT NULL
  • valor — text

Índices

  • PRIMARY → id
  • entidade → entidade, entidade_id, categoria_id

wpjy_parceiros_dados_categorias

  • id — int • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • entidade — enum('empresa','profissional','cliente','lead')
  • grupo_id — int • MUL
  • slug — varchar(100) • NOT NULL
  • nome — varchar(100) • NOT NULL
  • tipo — enum('boolean','text','number','enum')
  • opcoes — text
  • condicoes_json — json
  • grupo — varchar(100)
  • ordem — int

Índices

  • PRIMARY → id
  • id_contrato → id_contrato, entidade, slug
  • fk_dados_categorias_grupo → grupo_id

wpjy_parceiros_dados_grupos

  • id — int • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • entidade — enum('empresa','profissional','cliente','lead') • NOT NULL
  • nome — varchar(100) • NOT NULL
  • slug — varchar(100) • NOT NULL
  • ordem — int
  • ativo — tinyint(1)

Índices

  • PRIMARY → id
  • id_contrato → id_contrato, entidade, slug
  • id_contrato_2 → id_contrato

wpjy_parceiros_diferenciais

  • id — int • NOT NULL • PRI
  • nome — varchar(255) • NOT NULL

Índices

  • PRIMARY → id

wpjy_parceiros_documentos

  • id — int • NOT NULL • PRI
  • empresa_id — int
  • tipo — enum('cnpj','contrato_social','alvara','certidoes','termo_responsabilidade') • NOT NULL
  • arquivo — varchar(255) • NOT NULL
  • data_envio — datetime

Índices

  • PRIMARY → id

wpjy_parceiros_empresas

  • id — int • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • corretora_id — int • NOT NULL
  • razao_social — varchar(255) • NOT NULL
  • nome_fantasia — varchar(255)
  • cnpj — varchar(18) • NOT NULL
  • logo — varchar(255)
  • documento — varchar(255)
  • site — varchar(255)
  • facebook — varchar(255)
  • instagram — varchar(255)
  • youtube — varchar(255)
  • linkedin — varchar(255)
  • telefone — varchar(20)
  • email — varchar(255)
  • nome_responsavel — varchar(255)
  • cpf_responsavel — varchar(14)
  • telefone_responsavel — varchar(20)
  • desconto_min — decimal(5,2)
  • desconto_max — decimal(5,2)
  • descricao — text
  • categoria_id — int • NOT NULL
  • estabelecimento_tipo_id — int • MUL
  • avaliacao — varchar(255)
  • termos_aceitos — tinyint(1)
  • created_at — datetime • MUL
  • logradouro — varchar(255)
  • numero — varchar(20)
  • complemento — varchar(100)
  • bairro — varchar(100)
  • cidade — varchar(100) • MUL
  • estado — char(2)
  • cep — varchar(10)
  • status — varchar(20)
  • latitude — decimal(10,8)
  • longitude — decimal(11,8)
  • user_id — int • MUL
  • data_criacao — datetime

Índices

  • PRIMARY → id
  • uq_emp_contrato_cnpj → id_contrato, cnpj
  • idx_user_id → user_id
  • idx_emp_contrato_status → id_contrato, status
  • idx_emp_cidade_uf → cidade, estado
  • idx_emp_created → created_at
  • idx_emp_contrato_tipo_status → id_contrato, estabelecimento_tipo_id, status
  • idx_emp_tipo → estabelecimento_tipo_id

wpjy_parceiros_empresas_atuacoes

  • id — int • NOT NULL • PRI
  • id_empresa — int • NOT NULL • MUL
  • id_atuacao — int • NOT NULL • MUL

Índices

  • PRIMARY → id
  • uq_emp_atu → id_empresa, id_atuacao
  • id_empresa → id_empresa
  • id_atuacao → id_atuacao
  • idx_emp_atu_atuacao → id_atuacao
  • idx_emp_atu_emp → id_empresa

wpjy_parceiros_empresas_avaliacoes

  • id — int • NOT NULL • PRI
  • empresa_id — int • NOT NULL • MUL
  • user_id — int • MUL
  • nota — tinyint • NOT NULL
  • comentario — text
  • criado_em — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_av_empresa → empresa_id
  • idx_av_user → user_id

wpjy_parceiros_empresas_cnaes

  • id — int • NOT NULL • PRI
  • id_empresa — int • NOT NULL • MUL
  • id_cnae_subclasse — varchar(7) • NOT NULL • MUL
  • principal — tinyint(1)

Índices

  • PRIMARY → id
  • id_empresa → id_empresa
  • id_cnae_subclasse → id_cnae_subclasse

wpjy_parceiros_empresas_diferenciais

  • empresa_id — int • NOT NULL • PRI
  • diferencial_id — int • NOT NULL • PRI

Índices

  • PRIMARY → empresa_id, diferencial_id

wpjy_parceiros_empresas_especialidades

  • id — int • NOT NULL • PRI
  • id_empresa — int • NOT NULL • MUL
  • id_especialidade — int • NOT NULL • MUL

Índices

  • PRIMARY → id
  • uq_emp_esp → id_empresa, id_especialidade
  • id_empresa → id_empresa
  • id_especialidade → id_especialidade
  • idx_emp_esp_especialidade → id_especialidade
  • idx_emp_esp_emp → id_empresa

wpjy_parceiros_empresas_fotos

  • id — int • NOT NULL • PRI
  • id_empresa — int • NOT NULL • MUL
  • url — varchar(255) • NOT NULL
  • legenda — varchar(160)
  • ordem — int • NOT NULL
  • ativo — tinyint(1) • NOT NULL
  • created_at — datetime

Índices

  • PRIMARY → id
  • idx_emp → id_empresa, ativo, ordem

wpjy_parceiros_empresas_horarios

  • id — int • NOT NULL • PRI
  • id_empresa — int • NOT NULL • MUL
  • dia_semana — tinyint • NOT NULL
  • hora_abre — time
  • hora_fecha — time
  • fechado — tinyint(1) • NOT NULL
  • created_at — datetime

Índices

  • PRIMARY → id
  • uq_emp_dia → id_empresa, dia_semana

wpjy_parceiros_empresas_selos

  • empresa_id — int • NOT NULL • PRI
  • selo_id — int • NOT NULL • PRI

Índices

  • PRIMARY → empresa_id, selo_id

wpjy_parceiros_enderecos

  • id — int • NOT NULL • PRI
  • parceiro_tipo — enum('profissional','empresa') • NOT NULL • MUL
  • parceiro_id — int • NOT NULL
  • apelido — varchar(80)
  • logradouro — varchar(255) • MUL
  • numero — varchar(20)
  • complemento — varchar(100)
  • bairro — varchar(100) • MUL
  • cidade — varchar(100) • MUL
  • estado — char(2)
  • cep — varchar(10) • MUL
  • pais — varchar(80)
  • latitude — decimal(9,6) • MUL
  • longitude — decimal(9,6)
  • telefone — varchar(20)
  • whatsapp — varchar(20)
  • email — varchar(255)
  • is_principal — tinyint(1) • NOT NULL
  • ativo — tinyint(1) • NOT NULL • MUL
  • ordem — int • NOT NULL
  • data_criacao — datetime

Índices

  • PRIMARY → id
  • idx_parc → parceiro_tipo, parceiro_id
  • idx_ativo → ativo
  • idx_geo → latitude, longitude
  • ix_end_parc_tipo_parc → parceiro_tipo, parceiro_id
  • ix_end_latlng → latitude, longitude
  • idx_parc_end_tipo_id → parceiro_tipo, parceiro_id
  • idx_parc_end_ordem → parceiro_tipo, parceiro_id, is_principal, ordem
  • ix_end_cidade_uf_ativo → cidade, estado, ativo
  • ix_end_cep → cep
  • ix_end_bairro → bairro
  • ix_end_logradouro → logradouro

wpjy_parceiros_especialidades

  • id — int • NOT NULL • PRI
  • categoria_id — int • NOT NULL • MUL
  • id_contrato — int • NOT NULL • MUL
  • profissao_id — int • MUL
  • nome — varchar(255) • NOT NULL
  • descricao — mediumtext • NOT NULL
  • imagem — varchar(255)
  • parent_id — int • MUL

Índices

  • PRIMARY → id
  • uq_espec_id_contrato → id, id_contrato
  • uq_espec_contrato_profissao_nome → id_contrato, profissao_id, nome
  • parent_id → parent_id
  • fk_especialidade_categoria → categoria_id
  • idx_profissao → profissao_id
  • idx_espec_busca → id_contrato, categoria_id, profissao_id, parent_id
  • idx_espec_contrato_nome → id_contrato, nome
  • idx_espec_contrato_cat_nome → id_contrato, categoria_id, nome

wpjy_parceiros_estabelecimentos_tipos

  • id — int • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • slug — varchar(60) • NOT NULL
  • nome — varchar(120) • NOT NULL
  • icone — varchar(120)
  • ordem — int • NOT NULL
  • ativo — tinyint(1) • NOT NULL
  • created_at — datetime

Índices

  • PRIMARY → id
  • uq_tipo_contrato_slug → id_contrato, slug
  • idx_tipo_contrato_ativo → id_contrato, ativo, ordem, nome

wpjy_parceiros_filtros

  • id — bigint unsigned • NOT NULL • PRI
  • id_contrato — bigint unsigned • NOT NULL • MUL
  • entidade — enum('empresa','profissional','cliente','lead','usuario') • NOT NULL
  • slug — varchar(80) • NOT NULL
  • nome — varchar(255) • NOT NULL
  • descricao — text
  • tipo — enum('select','checkboxes','switch','range','date_range','search') • NOT NULL
  • source — enum('campo','dado_categoria','tabela') • NOT NULL
  • source_field — varchar(120)
  • categoria_id — bigint unsigned
  • tabela — varchar(120)
  • campo_label — varchar(120)
  • campo_valor — varchar(120)
  • multiple — tinyint(1) • NOT NULL
  • required — tinyint(1) • NOT NULL
  • ordem — int • NOT NULL
  • ativo — tinyint(1) • NOT NULL

Índices

  • PRIMARY → id
  • uq_parc_filtros_slug → id_contrato, entidade, slug
  • idx_parc_filtros_entidade → id_contrato, entidade

wpjy_parceiros_filtros_opcoes

  • id — bigint unsigned • NOT NULL • PRI
  • filtro_id — bigint unsigned • NOT NULL • MUL
  • valor — varchar(255) • NOT NULL
  • rotulo — varchar(255) • NOT NULL
  • ordem — int • NOT NULL
  • ativo — tinyint(1) • NOT NULL

Índices

  • PRIMARY → id
  • idx_filtro → filtro_id

wpjy_parceiros_horarios

  • id — int • NOT NULL • PRI
  • empresa_id — int
  • dia_semana — enum('segunda','terca','quarta','quinta','sexta','sabado','domingo') • NOT NULL
  • hora_inicio — time
  • hora_fim — time

Índices

  • PRIMARY → id

wpjy_parceiros_leads

  • id — int unsigned • NOT NULL • PRI
  • nome — varchar(250)
  • email — varchar(100) • NOT NULL
  • whatsapp — varchar(50)
  • cpf — varchar(20)
  • cnpj — varchar(20)
  • divulgador — int
  • src — varchar(50) • MUL
  • atendimento — varchar(20) • MUL
  • atendimento_inicio — datetime
  • atendimento_fim — datetime
  • parceiro — tinyint(1) • NOT NULL
  • atendente — int
  • owner_user_id — int • MUL
  • visita — int
  • contrato — int • MUL
  • corretora_id — int
  • data_cadastro — datetime • NOT NULL
  • user_id — int
  • avaliacao — varchar(50)
  • score — tinyint unsigned • NOT NULL • MUL
  • next_action_at — datetime • MUL
  • last_activity_at — datetime • MUL

Índices

  • PRIMARY → id
  • idx_leads_owner → owner_user_id
  • idx_leads_src → src
  • idx_leads_status → atendimento
  • idx_leads_score → score
  • idx_leads_next_action → next_action_at
  • idx_leads_last_activity → last_activity_at
  • idx_leads_contrato_status → contrato, atendimento
  • idx_leads_contrato_last → contrato, last_activity_at

wpjy_parceiros_proced_vinc_enderecos

  • id — int • NOT NULL • PRI
  • vinculo_id — int • NOT NULL • MUL
  • endereco_id — int • NOT NULL • MUL
  • ativo — tinyint(1) • NOT NULL
  • prioridade — tinyint unsigned
  • created_at — datetime

Índices

  • PRIMARY → id
  • uniq_vinc_end → vinculo_id, endereco_id
  • idx_end → endereco_id

wpjy_parceiros_procedimentos

  • id — int • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • categoria_id — int • NOT NULL • MUL
  • profissao_id — int • MUL
  • especialidade_id — int • MUL
  • atuacao_id — int • MUL
  • nome — varchar(255) • NOT NULL
  • descricao — mediumtext
  • ativo — tinyint(1) • NOT NULL
  • data_criacao — datetime

Índices

  • PRIMARY → id
  • idx_contrato → id_contrato
  • idx_categoria → categoria_id
  • idx_profissao → profissao_id
  • idx_esp → especialidade_id
  • idx_atuacao → atuacao_id

wpjy_parceiros_procedimentos_vinc_mod_enderecos

  • id — int • NOT NULL • PRI
  • vinculo_mod_id — int • NOT NULL • MUL
  • endereco_id — int • NOT NULL
  • ativo — tinyint(1) • NOT NULL

Índices

  • PRIMARY → id
  • uq_vme → vinculo_mod_id, endereco_id

wpjy_parceiros_procedimentos_vinculo_modalidades

  • id — int • NOT NULL • PRI
  • vinculo_id — int • NOT NULL • MUL
  • modalidade — enum('presencial','domicilio','online') • NOT NULL
  • ativo — tinyint(1) • NOT NULL
  • preco_particular — decimal(10,2)
  • preco_app — decimal(10,2)
  • preco_assinante — decimal(10,2)
  • duracao_minutos — int
  • url_online — varchar(255)
  • base_endereco_id — int
  • raio_km — decimal(6,2)
  • taxa_domicilio — decimal(10,2)
  • created_at — datetime
  • updated_at — datetime

Índices

  • PRIMARY → id
  • uq_vinc_mod → vinculo_id, modalidade

wpjy_parceiros_procedimentos_vinculos

  • id — int • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • parceiro_tipo — enum('profissional','empresa') • NOT NULL • MUL
  • parceiro_id — int • NOT NULL • MUL
  • endereco_id — int • MUL
  • procedimento_id — int • NOT NULL • MUL
  • preco_particular — decimal(10,2)
  • preco_app — decimal(10,2)
  • preco_assinante — decimal(10,2)
  • duracao_minutos — int
  • ativo — tinyint(1) • NOT NULL
  • data_criacao — datetime

Índices

  • PRIMARY → id
  • uq_parceiro_proced → parceiro_tipo, parceiro_id, procedimento_id
  • idx_contrato → id_contrato
  • idx_proc → procedimento_id
  • idx_endereco_id → endereco_id
  • ix_vincp_prof_ativo → parceiro_id, parceiro_tipo, ativo

wpjy_parceiros_procedimentos_vinculos_midias

  • id — int • NOT NULL • PRI
  • vinculo_id — int • NOT NULL • MUL
  • tipo — enum('imagem','video','documento') • NOT NULL • MUL
  • url — text • NOT NULL
  • tamanho_bytes — bigint unsigned • NOT NULL
  • thumb_url — text
  • titulo — varchar(255)
  • descricao — mediumtext
  • ordem — int • NOT NULL • MUL
  • is_capa — tinyint(1) • NOT NULL • MUL
  • ativo — tinyint(1) • NOT NULL • MUL
  • data_criacao — datetime

Índices

  • PRIMARY → id
  • idx_vinculo → vinculo_id
  • idx_tipo → tipo
  • idx_ppvm_vinc → vinculo_id
  • idx_ppvm_ordem → ordem
  • idx_ppvm_capa → is_capa
  • idx_ppvm_ativo → ativo

wpjy_parceiros_profissionais

  • id — int • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • id_empresa — int • MUL
  • nome_completo — varchar(255) • NOT NULL
  • nome_comercial — varchar(255)
  • descricao — text
  • cnpj_empresa — varchar(18)
  • cpf — varchar(18)
  • numero_credencial — varchar(50)
  • site — varchar(255)
  • facebook — varchar(255)
  • instagram — varchar(255)
  • youtube — varchar(255)
  • documento — varchar(255)
  • linkedin — varchar(255)
  • telefone — varchar(20)
  • email — varchar(255)
  • desconto_min — decimal(5,2)
  • desconto_max — decimal(5,2)
  • categoria_id — int
  • foto — varchar(255)
  • avaliacao — varchar(255)
  • genero — varchar(20)
  • tipo_atendimento — varchar(20)
  • disponibilidade_domicilio — tinyint(1)
  • termos_aceitos — tinyint(1)
  • created_at — datetime • MUL
  • logradouro — varchar(255)
  • numero — varchar(20)
  • complemento — varchar(100)
  • bairro — varchar(100)
  • cidade — varchar(100) • MUL
  • estado — char(2)
  • cep — varchar(10)
  • pais — varchar(80)
  • status — varchar(20)
  • latitude — decimal(10,8)
  • longitude — decimal(11,8)
  • user_id — int • MUL
  • data_criacao — datetime

Índices

  • PRIMARY → id
  • uq_prof_contrato_cpf → id_contrato, cpf
  • fk_parceiro_prof_empresa → id_empresa
  • idx_user_id → user_id
  • idx_prof_contrato_status → id_contrato, status
  • idx_prof_cidade_uf → cidade, estado
  • idx_prof_created → created_at
  • idx_prof_contrato_empresa_status → id_contrato, id_empresa, status

wpjy_parceiros_profissionais_agendamentos

  • id — int • NOT NULL • PRI
  • id_profissional — int • NOT NULL • MUL
  • empresa_id — int • MUL
  • unidade_id — int • MUL
  • endereco_id — int • MUL
  • user_id — int • NOT NULL
  • lead_id — int • MUL
  • data — date • NOT NULL
  • hora_inicio — time • NOT NULL
  • hora_fim — time • NOT NULL
  • order_id — bigint unsigned • MUL
  • invoice_id — bigint unsigned • MUL
  • pago_em — datetime
  • status — varchar(20)
  • descricao — text
  • created_at — datetime

Índices

  • PRIMARY → id
  • id_profissional → id_profissional, data, hora_inicio
  • idx_lead → lead_id
  • idx_order_invoice → order_id, invoice_id
  • ix_ag_prof_data → id_profissional, data, hora_inicio
  • idx_agds_prof_data → id_profissional, data, status
  • idx_agds_order → order_id
  • idx_agds_invoice → invoice_id
  • idx_ag_empresa → empresa_id
  • idx_ag_unidade → unidade_id
  • idx_ag_endereco → endereco_id

wpjy_parceiros_profissionais_aplicacoes

  • id — bigint unsigned • NOT NULL • PRI
  • id_contrato_raiz — int • NOT NULL
  • corretora_contrato_id — int
  • empresa_contrato_id — int • NOT NULL • MUL
  • unidade_contrato_id — int • NOT NULL • MUL
  • unidade_id — int • NOT NULL • MUL
  • profissional_id — int • NOT NULL
  • user_id — bigint unsigned • NOT NULL • MUL
  • status — enum('pending','approved','rejected','revoked','cancelled') • NOT NULL • MUL
  • mensagem — text
  • decided_by — bigint unsigned
  • decided_at — datetime
  • created_at — datetime • NOT NULL
  • updated_at — datetime

Índices

  • PRIMARY → id
  • uq_apl_unique → unidade_id, profissional_id, status
  • idx_apl_status → status, created_at
  • idx_apl_unidade → unidade_id, status
  • idx_apl_unidade_contrato → unidade_contrato_id, status
  • idx_apl_empresa_contrato → empresa_contrato_id, status
  • idx_apl_user → user_id, status

wpjy_parceiros_profissionais_atuacoes

  • id — int • NOT NULL • PRI
  • id_profissional — int • NOT NULL • MUL
  • id_atuacao — int • NOT NULL • MUL

Índices

  • PRIMARY → id
  • uq_prof_atu → id_profissional, id_atuacao
  • id_profissional → id_profissional
  • id_atuacao → id_atuacao
  • idx_prof_atu_atuacao → id_atuacao
  • idx_prof_atu_prof → id_profissional
  • id_profissional_2 → id_profissional
  • id_atuacao_2 → id_atuacao

wpjy_parceiros_profissionais_avaliacoes

  • id — int • NOT NULL • PRI
  • id_profissional — int • NOT NULL
  • nota — tinyint • NOT NULL
  • comentario — text
  • cliente_id — int
  • data — datetime

Índices

  • PRIMARY → id

wpjy_parceiros_profissionais_convenios_saude

  • id — bigint unsigned • NOT NULL • PRI
  • id_profissional — bigint unsigned • NOT NULL • MUL
  • id_contrato — bigint unsigned • NOT NULL
  • id_plano — bigint unsigned • NOT NULL • MUL
  • data_criacao — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uk_prof_contrato_plano → id_profissional, id_contrato, id_plano
  • idx_prof_contrato → id_profissional, id_contrato
  • idx_plano → id_plano

wpjy_parceiros_profissionais_disp_itens

  • id — int • NOT NULL • PRI
  • disp_id — int • NOT NULL • MUL
  • alvo_tipo — enum('servico','procedimento') • NOT NULL
  • vinculo_id — int • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_disp_item → disp_id, alvo_tipo, vinculo_id
  • fk_disp → disp_id

wpjy_parceiros_profissionais_dispon_scoped

  • id — int • NOT NULL • PRI
  • id_profissional — int • NOT NULL • MUL
  • modalidade — enum('presencial','domicilio','online') • NOT NULL
  • dia_semana — tinyint • NOT NULL
  • hora_inicio — time • NOT NULL
  • hora_fim — time • NOT NULL
  • endereco_id — int • MUL
  • servico_vinculo_id — int • MUL
  • procedimento_vinculo_id — int • MUL
  • capacidade — tinyint • NOT NULL
  • padding_minutos — tinyint
  • ativo — tinyint(1) • NOT NULL
  • created_at — datetime
  • updated_at — datetime

Índices

  • PRIMARY → id
  • ix_prof_modal_dia → id_profissional, modalidade, dia_semana
  • ix_endereco → endereco_id
  • ix_serv → servico_vinculo_id
  • ix_proc → procedimento_vinculo_id

wpjy_parceiros_profissionais_disponibilidade

  • id — int • NOT NULL • PRI
  • id_profissional — int • NOT NULL • MUL
  • modalidade — enum('presencial','domicilio','online')
  • endereco_id — int
  • dia_semana — tinyint • NOT NULL
  • hora_inicio — time • NOT NULL
  • hora_fim — time • NOT NULL
  • capacidade — tinyint unsigned • NOT NULL
  • padding_minutos — smallint unsigned • NOT NULL
  • label — varchar(120)
  • dt_inicio — date • MUL
  • dt_fim — date
  • created_at — datetime • NOT NULL
  • updated_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_prof_scope_dia → id_profissional, modalidade, endereco_id, dia_semana, hora_inicio, hora_fim
  • idx_vig → dt_inicio, dt_fim
  • ix_disp_prof_dia → id_profissional, dia_semana, hora_inicio, hora_fim
  • idx_disp_prof_dia → id_profissional, dia_semana

wpjy_parceiros_profissionais_documentos

  • id — int • NOT NULL • PRI
  • id_profissional — int • NOT NULL
  • tipo — varchar(50) • NOT NULL
  • arquivo — varchar(255) • NOT NULL
  • descricao — varchar(255)

Índices

  • PRIMARY → id

wpjy_parceiros_profissionais_especialidades

  • id — int • NOT NULL • PRI
  • id_profissional — int • NOT NULL • MUL
  • id_especialidade — int • NOT NULL • MUL

Índices

  • PRIMARY → id
  • uq_prof_esp → id_profissional, id_especialidade
  • id_profissional → id_profissional
  • id_especialidade → id_especialidade
  • idx_prof_esp_especialidade → id_especialidade
  • idx_prof_esp_prof → id_profissional
  • id_profissional_2 → id_profissional
  • id_especialidade_2 → id_especialidade

wpjy_parceiros_profissionais_indisponibilidades

  • id — int • NOT NULL • PRI
  • id_profissional — int • NOT NULL • MUL
  • data — date • NOT NULL
  • hora_inicio — time • NOT NULL
  • hora_fim — time • NOT NULL
  • motivo — varchar(255)
  • created_at — datetime

Índices

  • PRIMARY → id
  • ix_prof_data → id_profissional, data

wpjy_parceiros_profissionais_planos

  • id — int • NOT NULL • PRI
  • id_profissional — int • NOT NULL • MUL
  • id_plano — int • NOT NULL • MUL

Índices

  • PRIMARY → id
  • profissional_plano_unique → id_profissional, id_plano
  • fk_profissional_plano_plano → id_plano

wpjy_parceiros_profissionais_profile_fields

  • id — int • NOT NULL • PRI
  • profissional_id — int • NOT NULL • MUL
  • id_contrato — int • NOT NULL • MUL
  • source — enum('dynamic','core') • NOT NULL
  • slug — varchar(100) • NOT NULL
  • label — varchar(120)
  • section — varchar(80) • MUL
  • sort_order — int • NOT NULL
  • is_visible — tinyint(1) • NOT NULL
  • format — varchar(30)
  • created_at — datetime
  • updated_at — datetime

Índices

  • PRIMARY → id
  • uq_prof_contrato_source_slug → profissional_id, id_contrato, source, slug
  • idx_prof_contrato → profissional_id, id_contrato
  • idx_contrato → id_contrato
  • idx_section_sort → section, sort_order

wpjy_parceiros_profissionais_profile_settings

  • id — int • NOT NULL • PRI
  • profissional_id — int • NOT NULL • MUL
  • id_contrato — int • NOT NULL • MUL
  • visibility — enum('public','private') • NOT NULL
  • layout_json — json
  • updated_at — datetime

Índices

  • PRIMARY → id
  • uq_prof_contrato → profissional_id, id_contrato
  • idx_contrato → id_contrato
  • idx_prof → profissional_id

wpjy_parceiros_profissionais_profissoes

  • id — int • NOT NULL • PRI
  • id_profissional — int • NOT NULL • MUL
  • id_profissao — int • NOT NULL • MUL
  • academico — tinyint(1) • NOT NULL

Índices

  • PRIMARY → id
  • uq_prof_profissao → id_profissional, id_profissao
  • fk_ppp_profissao → id_profissao

wpjy_parceiros_profissionais_unidades

  • id — int • NOT NULL • PRI
  • id_profissional — int • NOT NULL • MUL
  • unidade_id — int • NOT NULL • MUL
  • ativo — tinyint(1) • NOT NULL
  • created_at — datetime

Índices

  • PRIMARY → id
  • uq_prof_unid → id_profissional, unidade_id
  • idx_unid → unidade_id, ativo
  • idx_prof → id_profissional, ativo

wpjy_parceiros_profissoes

  • id — int • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • categoria_id — int • NOT NULL • MUL
  • nome — varchar(150) • NOT NULL
  • descricao — mediumtext
  • imagem — varchar(255)
  • parent_id — int • MUL

Índices

  • PRIMARY → id
  • uq_profissao → id_contrato, categoria_id, nome
  • uq_prof_id_contrato → id, id_contrato
  • idx_parent → parent_id
  • fk_prof_categoria → categoria_id

wpjy_parceiros_selos

  • id — int • NOT NULL • PRI
  • nome — varchar(255) • NOT NULL

Índices

  • PRIMARY → id

wpjy_parceiros_servicos

  • id — int • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • nome — varchar(255) • NOT NULL
  • descricao — text
  • categoria_id — int • MUL
  • especialidade_id — int • MUL
  • profissao_id — int • MUL
  • atuacao_id — int • MUL
  • ativo — tinyint(1)
  • data_criacao — datetime

Índices

  • PRIMARY → id
  • categoria_id → categoria_id
  • especialidade_id → especialidade_id
  • atuacao_id → atuacao_id
  • id_contrato → id_contrato
  • idx_servicos_contrato_categoria → id_contrato, categoria_id
  • idx_profissao → profissao_id

wpjy_parceiros_servicos_midias

  • id — int • NOT NULL • PRI
  • servico_id — int • NOT NULL • MUL
  • id_contrato — int • NOT NULL • MUL
  • tipo — enum('imagem','video','documento') • NOT NULL
  • url — text • NOT NULL
  • thumb_url — text
  • titulo — varchar(255)
  • descricao — text
  • ordem — int • NOT NULL
  • is_capa — tinyint(1) • NOT NULL
  • ativo — tinyint(1) • NOT NULL
  • data_criacao — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_servico_ordem → servico_id, ordem
  • idx_servico_capa → servico_id, is_capa
  • idx_contrato → id_contrato

wpjy_parceiros_servicos_vinc_enderecos

  • id — int • NOT NULL • PRI
  • vinculo_id — int • NOT NULL • MUL
  • endereco_id — int • NOT NULL • MUL
  • ativo — tinyint(1) • NOT NULL
  • prioridade — tinyint unsigned
  • created_at — datetime

Índices

  • PRIMARY → id
  • uniq_vinc_end → vinculo_id, endereco_id
  • idx_end → endereco_id

wpjy_parceiros_servicos_vinc_mod_enderecos

  • id — int • NOT NULL • PRI
  • vinculo_mod_id — int • NOT NULL • MUL
  • endereco_id — int • NOT NULL • MUL
  • ativo — tinyint(1) • NOT NULL

Índices

  • PRIMARY → id
  • uq_vme → vinculo_mod_id, endereco_id
  • fk_vm → vinculo_mod_id
  • fk_end → endereco_id

wpjy_parceiros_servicos_vinculo_modalidades

  • id — int • NOT NULL • PRI
  • vinculo_id — int • NOT NULL • MUL
  • modalidade — enum('presencial','domicilio','online') • NOT NULL
  • ativo — tinyint(1) • NOT NULL
  • preco_particular — decimal(10,2)
  • preco_app — decimal(10,2)
  • preco_assinante — decimal(10,2)
  • duracao_minutos — int
  • url_online — varchar(255)
  • base_endereco_id — int • MUL
  • raio_km — decimal(6,2)
  • taxa_domicilio — decimal(10,2)
  • created_at — datetime
  • updated_at — datetime

Índices

  • PRIMARY → id
  • uq_vinc_mod → vinculo_id, modalidade
  • fk_vinc → vinculo_id
  • fk_base_end → base_endereco_id

wpjy_parceiros_servicos_vinculos

  • id — int • NOT NULL • PRI
  • parceiro_tipo — enum('empresa','profissional') • NOT NULL • MUL
  • parceiro_id — int • NOT NULL • MUL
  • endereco_id — int • MUL
  • servico_id — int • NOT NULL • MUL
  • preco_particular — decimal(10,2)
  • preco_app — decimal(10,2)
  • preco_assinante — decimal(10,2)
  • duracao_minutos — int
  • ativo — tinyint(1)

Índices

  • PRIMARY → id
  • parceiro_tipo → parceiro_tipo, parceiro_id, servico_id
  • servico_id → servico_id
  • parceiro_id → parceiro_id
  • idx_parceiro → parceiro_tipo, parceiro_id
  • idx_endereco_id → endereco_id
  • ix_vinc_prof_ativo → parceiro_id, parceiro_tipo, ativo

wpjy_parceiros_servicos_vinculos_midias

  • id — int • NOT NULL • PRI
  • vinculo_id — int • NOT NULL • MUL
  • tipo — enum('imagem','video','documento') • NOT NULL
  • url — text • NOT NULL
  • tamanho_bytes — bigint unsigned • NOT NULL
  • thumb_url — text
  • titulo — varchar(255)
  • descricao — text
  • ordem — int • NOT NULL
  • is_capa — tinyint(1) • NOT NULL
  • ativo — tinyint(1) • NOT NULL
  • data_criacao — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_vinculo_ordem → vinculo_id, ordem
  • idx_vinculo_capa → vinculo_id, is_capa

wpjy_parceiros_unidades

  • id — int • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • empresa_id — int • NOT NULL • MUL
  • endereco_id — int • NOT NULL • UNI
  • nome — varchar(120) • NOT NULL
  • cnpj — varchar(18) • NOT NULL
  • razao_social — varchar(255)
  • nome_fantasia — varchar(255)
  • ie — varchar(30)
  • im — varchar(30)
  • cnae — varchar(20)
  • regime_tributario — varchar(30)
  • nf_config_json — longtext
  • ativo — tinyint(1) • NOT NULL
  • created_at — datetime
  • contrato_unidade_id — int • MUL

Índices

  • PRIMARY → id
  • uq_unid_contrato_cnpj → id_contrato, cnpj
  • uq_unid_endereco → endereco_id
  • idx_unid_contrato_empresa → id_contrato, empresa_id, ativo
  • idx_unid_empresa → empresa_id
  • idx_unid_endereco → endereco_id
  • idx_unid_contrato_ativo → id_contrato, ativo
  • idx_unid_contrato_unid → contrato_unidade_id

wpjy_parceiros_unidades_fotos

  • id — int • NOT NULL • PRI
  • unidade_id — int • NOT NULL • MUL
  • url — varchar(255) • NOT NULL
  • legenda — varchar(160)
  • ordem — int • NOT NULL
  • ativo — tinyint(1) • NOT NULL
  • created_at — datetime

Índices

  • PRIMARY → id
  • idx_unid → unidade_id, ativo, ordem

wpjy_parceiros_unidades_horarios

  • id — int • NOT NULL • PRI
  • unidade_id — int • NOT NULL • MUL
  • dia_semana — tinyint • NOT NULL
  • abre — time
  • fecha — time
  • fechado — tinyint(1) • NOT NULL
  • ativo — tinyint(1) • NOT NULL
  • created_at — datetime

Índices

  • PRIMARY → id
  • uq_unid_dia → unidade_id, dia_semana
  • idx_unid_ativo → unidade_id, ativo

wpjy_parceiros_unidades_usuarios

  • id — int • NOT NULL • PRI
  • unidade_id — int • NOT NULL • MUL
  • user_id — bigint unsigned • NOT NULL • MUL
  • papel — varchar(50) • NOT NULL
  • permissoes_json — longtext
  • ativo — tinyint(1) • NOT NULL
  • created_at — datetime

Índices

  • PRIMARY → id
  • uq_unid_user → unidade_id, user_id
  • idx_user → user_id, ativo
  • idx_unid → unidade_id, ativo

wpjy_payment_accounts

  • id — int unsigned • NOT NULL
  • id_contrato — int unsigned • NOT NULL
  • gateway — varchar(40) • NOT NULL
  • gateway_id — int
  • role — enum('default','cc','corp')
  • ativo — tinyint unsigned • NOT NULL
  • email — varchar(250)
  • label — text • NOT NULL
  • wallet — text • NOT NULL
  • webhook — text • NOT NULL
  • config_encrypted — longtext
  • pix — tinyint unsigned • NOT NULL
  • boleto — tinyint unsigned • NOT NULL
  • cartao — tinyint unsigned • NOT NULL
  • sandbox — tinyint unsigned • NOT NULL
  • created_at — timestamp
  • updated_at — timestamp

wpjy_payment_gateways

  • id — int • NOT NULL • PRI
  • provider — varchar(40) • NOT NULL • UNI
  • label — varchar(100) • NOT NULL
  • enabled — tinyint(1) • NOT NULL • MUL
  • secret_blob — text
  • settings_json — json
  • created_at — datetime • NOT NULL • MUL

Índices

  • PRIMARY → id
  • provider → provider
  • idx_provider → provider
  • idx_enabled → enabled
  • idx_created → created_at

wpjy_perfil

  • id — int • NOT NULL • PRI
  • nome — varchar(45)
  • permissoes — text
  • id_contrato — varchar(50)
  • lixeira — tinyint

Índices

  • PRIMARY → id

wpjy_perm_audit

  • id — bigint unsigned • NOT NULL • PRI
  • happened_at — datetime • NOT NULL • MUL
  • action — varchar(100) • NOT NULL • MUL
  • table_name — varchar(100) • MUL
  • record_id — bigint
  • actor_user_id — bigint • MUL
  • message — text

Índices

  • PRIMARY → id
  • ix_perm_audit_when → happened_at
  • ix_perm_audit_action → action
  • ix_perm_audit_table → table_name
  • ix_perm_audit_actor → actor_user_id

wpjy_perm_cache_version

  • id — tinyint unsigned • NOT NULL • PRI
  • v — bigint unsigned • NOT NULL
  • updated_at — datetime • NOT NULL

Índices

  • PRIMARY → id

wpjy_perm_contract_kit

  • id — bigint unsigned • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • kit_id — bigint unsigned • NOT NULL • MUL
  • ativo — tinyint(1) • NOT NULL • MUL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_contrato_kit → id_contrato, kit_id
  • ux_contract_kit → id_contrato, kit_id
  • idx_contrato_ativo → id_contrato, ativo
  • fk_ck_kit → kit_id
  • ix_contract_kit_ativo → ativo
  • ix_pck_ativo → ativo

wpjy_perm_contract_overrides

  • id — bigint unsigned • NOT NULL • PRI
  • id_contrato — int • NOT NULL • MUL
  • target_type — enum('namespace','slug') • NOT NULL • MUL
  • target_value — varchar(190) • NOT NULL
  • effect — enum('allow','deny') • NOT NULL • MUL
  • motivo — varchar(255)
  • created_at — datetime • NOT NULL
  • created_by — bigint unsigned

Índices

  • PRIMARY → id
  • idx_contrato → id_contrato
  • idx_target → target_type, target_value
  • idx_effect → effect
  • ix_pco_contrato → id_contrato
  • ix_pco_effect → effect
  • ix_pco_tt_tv → target_type, target_value

wpjy_perm_kit_namespace

  • id — bigint unsigned • NOT NULL • PRI
  • kit_id — bigint unsigned • NOT NULL • MUL
  • namespace_id — bigint unsigned • NOT NULL • MUL
  • effect — enum('allow','deny') • NOT NULL • MUL

Índices

  • PRIMARY → id
  • uq_kit_ns → kit_id, namespace_id
  • idx_effect → effect
  • fk_kn_ns → namespace_id

wpjy_perm_kits

  • id — bigint unsigned • NOT NULL • PRI
  • slug — varchar(80) • NOT NULL • UNI
  • label — varchar(120) • NOT NULL
  • descricao — text
  • icone — varchar(80)
  • ativo — tinyint(1) • NOT NULL • MUL
  • created_at — datetime • NOT NULL
  • updated_at — datetime

Índices

  • PRIMARY → id
  • uq_kit_slug → slug
  • ux_perm_kits_slug → slug
  • idx_kit_ativo → ativo
  • ix_perm_kits_ativo → ativo

wpjy_perm_namespaces

  • id — bigint unsigned • NOT NULL • PRI
  • ns — varchar(190) • NOT NULL • UNI
  • label — varchar(160) • NOT NULL
  • descricao — text
  • escopo — enum('global','contrato','equipe','usuario') • NOT NULL • MUL
  • ativo — tinyint(1) • NOT NULL • MUL
  • created_at — datetime • NOT NULL
  • updated_at — datetime
  • ns_like — varchar(190) • MUL

Índices

  • PRIMARY → id
  • uq_ns → ns
  • ux_perm_namespaces_ns → ns
  • idx_escopo_ativo → escopo, ativo
  • idx_ns_like → ns_like
  • ix_perm_namespaces_escopo → escopo
  • ix_perm_namespaces_ativo → ativo

wpjy_perm_scanner_queue

  • id — bigint unsigned • NOT NULL • PRI
  • arquivo — varchar(160) • NOT NULL • MUL
  • slug_detectado — varchar(190) • NOT NULL • MUL
  • sugerido_namespace — varchar(190)
  • sugerido_kit — varchar(80)
  • status — enum('novo','revisado','aplicado','ignorado') • NOT NULL • MUL
  • created_at — datetime • NOT NULL
  • created_by — bigint unsigned

Índices

  • PRIMARY → id
  • idx_status → status
  • idx_slug → slug_detectado
  • idx_arquivo → arquivo
  • ix_psq_status → status
  • ix_psq_slug → slug_detectado
  • ix_psq_arquivo → arquivo

wpjy_perm_team_overrides

  • id — bigint unsigned • NOT NULL • PRI
  • equipe_id — int • NOT NULL • MUL
  • target_type — enum('namespace','slug') • NOT NULL • MUL
  • target_value — varchar(190) • NOT NULL
  • effect — enum('allow','deny') • NOT NULL • MUL
  • motivo — varchar(255)
  • created_at — datetime • NOT NULL
  • created_by — bigint unsigned

Índices

  • PRIMARY → id
  • idx_equipe → equipe_id
  • idx_target → target_type, target_value
  • idx_effect → effect
  • ix_pto_equipe → equipe_id
  • ix_pto_effect → effect
  • ix_pto_tt_tv → target_type, target_value

wpjy_perm_tela_kit_map

  • id — bigint unsigned • NOT NULL • PRI
  • id_tela — int • NOT NULL • MUL
  • kit_id — int • NOT NULL
  • prioridade — int • NOT NULL
  • created_at — datetime

Índices

  • PRIMARY → id
  • ux_tela_kit → id_tela, kit_id
  • ix_tela_pri → id_tela, prioridade

wpjy_perm_tela_namespace

  • id — bigint unsigned • NOT NULL • PRI
  • padrao_arquivo — varchar(160) • NOT NULL • UNI
  • ns — varchar(190) • NOT NULL • MUL
  • sensivel — tinyint(1) • NOT NULL

Índices

  • PRIMARY → id
  • uq_padrao → padrao_arquivo
  • ux_padrao_arquivo → padrao_arquivo
  • ix_ns → ns

wpjy_perm_user_overrides

  • id — bigint unsigned • NOT NULL • PRI
  • user_id — bigint unsigned • NOT NULL • MUL
  • target_type — enum('namespace','slug') • NOT NULL • MUL
  • target_value — varchar(190) • NOT NULL
  • effect — enum('allow','deny') • NOT NULL • MUL
  • motivo — varchar(255)
  • valid_from — datetime • NOT NULL • MUL
  • valid_to — datetime
  • created_at — datetime • NOT NULL
  • created_by — bigint unsigned

Índices

  • PRIMARY → id
  • idx_user → user_id
  • idx_valid → valid_from, valid_to
  • idx_target → target_type, target_value
  • idx_effect → effect
  • ix_puo_user → user_id
  • ix_puo_effect → effect
  • ix_puo_tt_tv → target_type, target_value
  • ix_puo_valid → valid_from, valid_to

wpjy_permissions

  • id — int • NOT NULL • PRI
  • name — varchar(255) • NOT NULL
  • description — text • NOT NULL
  • slug — varchar(50)
  • tela — int
  • permission_level — int • NOT NULL
  • ativo — tinyint(1) • NOT NULL
  • criar — tinyint(1) • NOT NULL
  • atualizar — tinyint(1) • NOT NULL
  • deletar — tinyint(1) • NOT NULL
  • exportar — tinyint(1) • NOT NULL

Índices

  • PRIMARY → id

wpjy_permissions_contract_map

  • contract_id — int • NOT NULL
  • permission_id — int • NOT NULL

wpjy_permissions_group_map

  • group_id — int • NOT NULL
  • permission_id — int • NOT NULL

wpjy_permissions_groups

  • id — int • NOT NULL • PRI
  • name — varchar(255) • NOT NULL
  • description — text • NOT NULL
  • slug — varchar(255) • NOT NULL

Índices

  • PRIMARY → id

wpjy_permissions_log

  • id — int unsigned • NOT NULL • PRI
  • user_id — int • NOT NULL
  • permission_id — int • NOT NULL
  • last_access_date — datetime • NOT NULL
  • views — int unsigned • NOT NULL

Índices

  • PRIMARY → id

wpjy_permissions_map

  • user_id — int • NOT NULL
  • role_name — varchar(255) • NOT NULL
  • group_id — int • NOT NULL

wpjy_permissions_url_map

  • url — varchar(255) • NOT NULL
  • permission_id — int • NOT NULL

wpjy_permissoes

  • id — int • NOT NULL • PRI
  • slug — varchar(100) • NOT NULL • UNI
  • nome — varchar(255) • NOT NULL • MUL
  • descricao — text
  • id_tela — int • MUL
  • tipo — enum('tela','menu','acao','grafico','widget','area') • MUL

Índices

  • PRIMARY → id
  • slug → slug
  • uq_slug → slug
  • uq_permissoes_slug → slug
  • id_tela → id_tela
  • idx_permissoes_id_tela → id_tela
  • idx_permissoes_slug → slug
  • idx_permissoes_nome → nome
  • idx_tipo → tipo
  • idx_permissoes_tipo → tipo

wpjy_planos

  • id — int • NOT NULL • PRI
  • nome — varchar(45)
  • data_cad — datetime
  • dia_vencimento — int
  • carta_berco — varchar(45)
  • codigo_cartao — varchar(15)
  • idade_limite — int
  • carencia — int
  • valor — decimal(10,2)
  • valor_adesao — decimal(10,2)
  • valor_anual — decimal(10,2)
  • cartao_frente — text
  • cartao_frente_texto — longtext
  • cartao_tras — text
  • cartao_tras_texto — longtext
  • gateway — int • MUL
  • metodos — varchar(100)
  • peridiocidade — varchar(50) • NOT NULL
  • boleto_instrucoes — text
  • certificado — longtext
  • lixeira — tinyint

Índices

  • PRIMARY → id
  • gateway → gateway

wpjy_planos_certificados

  • id — int • NOT NULL • PRI
  • id_plano — int • MUL
  • texto — text

Índices

  • PRIMARY → id
  • id_plano → id_plano

wpjy_planos_convenios

  • id — int • NOT NULL • PRI
  • id_plano — int • MUL
  • id_convenio — int • MUL

Índices

  • PRIMARY → id
  • ids → id_plano, id_convenio
  • id_plano → id_plano
  • id_convenio → id_convenio

wpjy_plans

  • id — bigint unsigned • NOT NULL • PRI
  • id_contrato — bigint unsigned • NOT NULL • MUL
  • code — varchar(64) • NOT NULL
  • name — varchar(128) • NOT NULL
  • cycle — varchar(16) • NOT NULL
  • price — decimal(14,2) • NOT NULL
  • currency — varchar(8) • NOT NULL
  • audience — enum('any','client','professional','company','affiliate') • NOT NULL
  • trial_months — int • NOT NULL
  • requires_billing_on_trial — tinyint(1) • NOT NULL
  • is_default — tinyint(1) • NOT NULL
  • sort_order — int • NOT NULL
  • profissao_json — json
  • features_json — json
  • status — varchar(16) • NOT NULL • MUL
  • visibility — enum('public','hidden') • NOT NULL
  • meta — json
  • created_at — datetime • NOT NULL
  • updated_at — datetime

Índices

  • PRIMARY → id
  • uq_plans_contract_code → id_contrato, code
  • idx_plans_status → status
  • idx_plans_contract_status → id_contrato, status

wpjy_postmeta

  • meta_id — bigint unsigned • NOT NULL • PRI
  • post_id — bigint unsigned • NOT NULL • MUL
  • meta_key — varchar(255) • MUL
  • meta_value — longtext

Índices

  • PRIMARY → meta_id
  • post_id → post_id
  • meta_key → meta_key

wpjy_posts

  • ID — bigint unsigned • NOT NULL • PRI
  • post_author — bigint unsigned • NOT NULL • MUL
  • post_date — datetime • NOT NULL
  • post_date_gmt — datetime • NOT NULL
  • post_content — longtext • NOT NULL
  • post_title — text • NOT NULL
  • post_excerpt — text • NOT NULL
  • post_status — varchar(20) • NOT NULL
  • comment_status — varchar(20) • NOT NULL
  • ping_status — varchar(20) • NOT NULL
  • post_password — varchar(255) • NOT NULL
  • post_name — varchar(200) • NOT NULL • MUL
  • to_ping — text • NOT NULL
  • pinged — text • NOT NULL
  • post_modified — datetime • NOT NULL
  • post_modified_gmt — datetime • NOT NULL
  • post_content_filtered — longtext • NOT NULL
  • post_parent — bigint unsigned • NOT NULL • MUL
  • guid — varchar(255) • NOT NULL
  • menu_order — int • NOT NULL
  • post_type — varchar(20) • NOT NULL • MUL
  • post_mime_type — varchar(100) • NOT NULL
  • comment_count — bigint • NOT NULL

Índices

  • PRIMARY → ID
  • post_name → post_name
  • type_status_date → post_type, post_status, post_date, ID
  • post_parent → post_parent
  • post_author → post_author

wpjy_profissionais_leads_map

  • id — bigint unsigned • NOT NULL • PRI
  • id_profissional — bigint unsigned • NOT NULL • MUL
  • id_lead — bigint unsigned • NOT NULL • MUL
  • papel — enum('owner','colaborador','referente') • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_prof_lead → id_profissional, id_lead
  • idx_lead → id_lead
  • idx_prof → id_profissional

wpjy_profissional_atuacoes

  • profissional_id — int • NOT NULL • PRI
  • atuacao_id — int • NOT NULL • PRI

Índices

  • PRIMARY → profissional_id, atuacao_id

wpjy_profissional_especialidades

  • profissional_id — int • NOT NULL • PRI
  • especialidade_id — int • NOT NULL • PRI

Índices

  • PRIMARY → profissional_id, especialidade_id

wpjy_redesocial_comments

  • id — bigint unsigned • NOT NULL • PRI
  • post_id — bigint unsigned • NOT NULL • MUL
  • user_id — bigint unsigned • NOT NULL • MUL
  • content — text
  • created_at — datetime
  • updated_at — datetime

Índices

  • PRIMARY → id
  • post_id → post_id
  • user_id → user_id

wpjy_redesocial_followers

  • id — bigint unsigned • NOT NULL • PRI
  • follower_id — bigint unsigned • NOT NULL • MUL
  • following_id — bigint unsigned • NOT NULL • MUL
  • id_contrato — int • MUL
  • created_at — datetime

Índices

  • PRIMARY → id
  • unique_follow → follower_id, following_id
  • follower_id → follower_id
  • following_id → following_id
  • idx_following_created → following_id, created_at
  • idx_contrato_following_created → id_contrato, following_id, created_at

wpjy_redesocial_messages

  • id — bigint unsigned • NOT NULL • PRI
  • sender_id — bigint unsigned • NOT NULL • MUL
  • receiver_id — bigint unsigned • NOT NULL • MUL
  • id_contrato — int • MUL
  • content — text
  • is_read — tinyint(1)
  • created_at — datetime
  • conv_key — bigint • MUL
  • conv_key_b — bigint

Índices

  • PRIMARY → id
  • sender_id → sender_id
  • receiver_id → receiver_id
  • idx_conv_pair → conv_key, conv_key_b, created_at
  • idx_sender_receiver_created → sender_id, receiver_id, created_at
  • idx_receiver_created → receiver_id, created_at
  • idx_contrato_receiver_created → id_contrato, receiver_id, created_at

wpjy_redesocial_notifications

  • id — bigint unsigned • NOT NULL • PRI
  • user_id — bigint unsigned • NOT NULL • MUL
  • sender_id — bigint unsigned • MUL
  • id_contrato — int • MUL
  • type — varchar(50)
  • reference_id — bigint unsigned
  • message — text
  • is_read — tinyint(1)
  • created_at — datetime

Índices

  • PRIMARY → id
  • user_id → user_id
  • sender_id → sender_id
  • idx_contrato_user_read_created → id_contrato, user_id, is_read, created_at

wpjy_redesocial_post_comments

  • id — bigint unsigned • NOT NULL • PRI
  • post_id — bigint unsigned • NOT NULL • MUL
  • user_id — bigint unsigned • NOT NULL
  • id_contrato — int • MUL
  • content — text • NOT NULL
  • parent_id — bigint unsigned • MUL
  • created_at — datetime

Índices

  • PRIMARY → id
  • post_id → post_id
  • parent_id → parent_id
  • idx_post_parent_created → post_id, parent_id, created_at
  • idx_contrato_post_created → id_contrato, post_id, created_at

wpjy_redesocial_post_likes

  • id — bigint unsigned • NOT NULL • PRI
  • post_id — bigint unsigned • NOT NULL • MUL
  • user_id — bigint unsigned • NOT NULL • MUL
  • id_contrato — int • MUL
  • reaction_type — varchar(50)
  • created_at — datetime

Índices

  • PRIMARY → id
  • unique_like → post_id, user_id
  • post_id → post_id
  • user_id → user_id
  • idx_post_created → post_id, created_at
  • idx_contrato_post_created → id_contrato, post_id, created_at

wpjy_redesocial_post_media

  • id — bigint unsigned • NOT NULL • PRI
  • post_id — bigint unsigned • NOT NULL • MUL
  • id_contrato — int • MUL
  • type — enum('image','video')
  • provider — varchar(20)
  • status — varchar(20)
  • mime — varchar(120)
  • size — bigint unsigned
  • sha1 — char(40)
  • storage_path — text
  • stream_video_id — varchar(40) • MUL
  • play_url — text
  • thumb_url — text
  • file_path — varchar(255) • NOT NULL
  • created_at — datetime

Índices

  • PRIMARY → id
  • post_id → post_id
  • idx_post_id_id → post_id, id
  • idx_contrato_post → id_contrato, post_id, id
  • idx_stream_video_id → stream_video_id

wpjy_redesocial_post_views

  • id — bigint unsigned • NOT NULL • PRI
  • post_id — bigint unsigned • NOT NULL • MUL
  • viewer_id — bigint unsigned • MUL
  • session_key — varchar(64) • MUL
  • ip_hash — char(64)
  • user_agent — varchar(255)
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_post_created → post_id, created_at
  • idx_viewer_created → viewer_id, created_at
  • idx_session_created → session_key, created_at

wpjy_redesocial_posts

  • id — bigint unsigned • NOT NULL • PRI
  • user_id — bigint unsigned • NOT NULL • MUL
  • id_contrato — int • MUL
  • tipo — enum('text','photo','article')
  • content — text
  • image — varchar(255)
  • video — varchar(255)
  • created_at — datetime
  • updated_at — datetime

Índices

  • PRIMARY → id
  • user_id → user_id
  • idx_user_id_id → user_id, id
  • idx_contrato_user_id → id_contrato, user_id, id

wpjy_redesocial_upload_sessions

  • id — bigint unsigned • NOT NULL • PRI
  • upload_uid — char(36) • NOT NULL • UNI
  • id_contrato — int • MUL
  • user_id — bigint unsigned • NOT NULL • MUL
  • target — varchar(30) • NOT NULL
  • post_id — bigint unsigned
  • media_type — enum('image','video','file') • NOT NULL
  • original_name — varchar(255)
  • mime — varchar(120)
  • ext — varchar(20)
  • total_size — bigint unsigned • NOT NULL
  • chunk_size — int unsigned • NOT NULL
  • total_chunks — int unsigned • NOT NULL
  • received_chunks — int unsigned • NOT NULL
  • status — enum('open','uploading','finalizing','done','error','expired') • NOT NULL
  • error_message — text
  • temp_dir — varchar(255)
  • created_at — datetime • NOT NULL
  • updated_at — datetime
  • expires_at — datetime • MUL

Índices

  • PRIMARY → id
  • uq_upload_uid → upload_uid
  • idx_user_status → user_id, status
  • idx_contrato_status → id_contrato, status
  • idx_expires → expires_at

wpjy_redesocial_user_links

  • id — bigint unsigned • NOT NULL • PRI
  • user_id — bigint unsigned • NOT NULL • MUL
  • id_contrato — int • MUL
  • platform — varchar(50) • NOT NULL
  • url — varchar(255) • NOT NULL
  • created_at — datetime
  • updated_at — datetime

Índices

  • PRIMARY → id
  • user_id → user_id
  • idx_contrato_user → id_contrato, user_id

wpjy_redesocial_user_media

  • id — bigint unsigned • NOT NULL • PRI
  • user_id — bigint unsigned • NOT NULL • MUL
  • id_contrato — int • MUL
  • type — enum('image','video')
  • provider — varchar(20)
  • status — varchar(20)
  • mime — varchar(120)
  • size — bigint unsigned
  • sha1 — char(40)
  • storage_path — text
  • stream_video_id — varchar(40) • MUL
  • play_url — text
  • thumb_url — text
  • file_path — varchar(255)
  • title — varchar(255)
  • kind — varchar(20) • MUL
  • expires_at — datetime
  • created_at — datetime
  • updated_at — datetime

Índices

  • PRIMARY → id
  • user_id → user_id
  • idx_contrato_user → id_contrato, user_id, id
  • idx_user_created → user_id, created_at
  • idx_kind_expires → kind, expires_at
  • idx_stream_video_id → stream_video_id

wpjy_redesocial_user_profiles

  • user_id — bigint unsigned • NOT NULL • PRI
  • id_contrato — int • MUL
  • bio — text
  • location — varchar(255)
  • profession — varchar(255)
  • website — varchar(255)
  • birthday — date
  • cover_image — varchar(255)
  • created_at — datetime
  • updated_at — datetime

Índices

  • PRIMARY → user_id
  • idx_contrato_user → id_contrato, user_id

wpjy_remessas

  • id — int • NOT NULL • PRI
  • data_criacao — datetime • NOT NULL
  • user_id — bigint • NOT NULL
  • arquivo — varchar(50)

Índices

  • PRIMARY → id

wpjy_representante

  • id — int • NOT NULL • PRI
  • termo — longtext • NOT NULL
  • termo_vend — longtext • NOT NULL
  • termo_url — text • NOT NULL
  • termo_url_vend — text • NOT NULL

Índices

  • PRIMARY → id

wpjy_representantes

  • id — int • NOT NULL • PRI
  • nome — varchar(150) • NOT NULL
  • cpf — varchar(15) • NOT NULL
  • email — varchar(250) • NOT NULL
  • celular — varchar(15) • NOT NULL
  • telefone — varchar(15) • NOT NULL
  • banco — varchar(4) • NOT NULL
  • agencia — varchar(8) • NOT NULL
  • conta — varchar(12) • NOT NULL
  • logradouro — varchar(250) • NOT NULL
  • numero — varchar(50) • NOT NULL
  • complemento — varchar(50) • NOT NULL
  • bairro — varchar(80) • NOT NULL
  • cidade — varchar(80) • NOT NULL
  • uf — varchar(2) • NOT NULL
  • cep — varchar(10) • NOT NULL
  • data_cadastro — datetime • NOT NULL
  • lixeira — tinyint • NOT NULL

Índices

  • PRIMARY → id

wpjy_representantes_aceite

  • id — int • NOT NULL • PRI
  • id_representante — int • NOT NULL
  • ip — varchar(100) • NOT NULL
  • data_aceite — datetime • NOT NULL

Índices

  • PRIMARY → id

wpjy_role_bindings

  • id — bigint unsigned • NOT NULL • PRI
  • role_slug — varchar(64) • NOT NULL • MUL
  • scope_type — enum('global','contrato','equipe') • NOT NULL • MUL
  • scope_id — bigint unsigned
  • principal_type — enum('usuario','equipe','grupo') • NOT NULL • MUL
  • principal_id — bigint unsigned • NOT NULL
  • is_primary — tinyint(1) • NOT NULL
  • priority — int unsigned • NOT NULL • MUL
  • valid_from — datetime • NOT NULL • MUL
  • valid_to — datetime
  • created_by — bigint unsigned
  • created_at — datetime • NOT NULL
  • updated_at — datetime

Índices

  • PRIMARY → id
  • idx_role_scope_time → role_slug, scope_type, scope_id, valid_from, valid_to, priority
  • idx_scope_role → scope_type, scope_id, role_slug, valid_to, priority
  • idx_principal → principal_type, principal_id
  • idx_active_window → valid_from, valid_to
  • ix_rb_role → role_slug
  • ix_rb_scope → scope_type, scope_id
  • ix_rb_principal → principal_type, principal_id
  • ix_rb_valid → valid_from, valid_to
  • ix_rb_priority → priority

wpjy_role_catalog

  • slug — varchar(64) • NOT NULL • PRI
  • label — varchar(120) • NOT NULL
  • multiplicidade — enum('single','multi') • NOT NULL
  • scope_mask — set('global','contrato','equipe') • NOT NULL
  • lens — varchar(40)
  • created_at — datetime • NOT NULL
  • updated_at — datetime

Índices

  • PRIMARY → slug
  • ux_role_catalog_slug → slug

wpjy_search_history

  • id — bigint unsigned • NOT NULL • PRI
  • id_contrato — bigint unsigned • NOT NULL • MUL
  • user_id — bigint unsigned • NOT NULL
  • term — varchar(190) • NOT NULL
  • term_norm — varchar(190) • NOT NULL
  • hits — int unsigned • NOT NULL
  • last_used_at — datetime • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uk_contract_user_term → id_contrato, user_id, term_norm
  • ix_user_last → id_contrato, user_id, last_used_at
  • ix_user_hits → id_contrato, user_id, hits

wpjy_search_terms

  • id — bigint unsigned • NOT NULL • PRI
  • id_contrato — bigint unsigned • NOT NULL • MUL
  • term — varchar(190) • NOT NULL
  • term_norm — varchar(190) • NOT NULL
  • hits — int unsigned • NOT NULL
  • last_searched_at — datetime
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uk_contract_term → id_contrato, term_norm
  • ix_contract_hits → id_contrato, hits
  • ix_contract_last → id_contrato, last_searched_at

wpjy_sis_config

  • id — int • NOT NULL • PRI
  • categoria — varchar(50)
  • chave — varchar(100) • NOT NULL • UNI
  • valor — text
  • descricao — text
  • updated_at — datetime

Índices

  • PRIMARY → id
  • chave → chave

wpjy_smush_dir_images

  • id — mediumint unsigned • NOT NULL • PRI
  • path — text • NOT NULL
  • path_hash — char(32) • UNI
  • resize — varchar(55)
  • lossy — varchar(55)
  • error — varchar(55)
  • image_size — int unsigned • MUL
  • orig_size — int unsigned
  • file_time — int unsigned
  • last_scan — timestamp • NOT NULL
  • meta — text

Índices

  • PRIMARY → id
  • path_hash → path_hash
  • image_size → image_size

wpjy_snippets

  • id — bigint • NOT NULL • PRI
  • name — tinytext • NOT NULL
  • description — text • NOT NULL
  • code — longtext • NOT NULL
  • tags — longtext • NOT NULL
  • scope — varchar(15) • NOT NULL • MUL
  • priority — smallint • NOT NULL
  • active — tinyint(1) • NOT NULL • MUL
  • modified — datetime • NOT NULL
  • revision — bigint • NOT NULL
  • cloud_id — varchar(255)

Índices

  • PRIMARY → id
  • scope → scope
  • active → active

wpjy_tarefas

  • id — bigint unsigned • NOT NULL • PRI
  • id_contrato — int unsigned • MUL
  • titulo — varchar(255) • NOT NULL
  • descricao — longtext
  • status — enum('aberta','em_andamento','concluida','bloqueada','cancelada') • NOT NULL • MUL
  • prioridade — enum('baixa','media','alta','urgente') • NOT NULL • MUL
  • tipo — enum('tarefa','chamada','reuniao','followup','bug','melhoria','outro') • NOT NULL
  • data_inicio — date • MUL
  • data_fim_prevista — date • MUL
  • data_conclusao — datetime
  • progresso — tinyint unsigned • NOT NULL
  • visibilidade — enum('privada','equipe','contrato','publica') • NOT NULL
  • etiquetas — varchar(255)
  • criador_id — bigint unsigned • NOT NULL • MUL
  • responsavel_id — bigint unsigned • MUL
  • meta_principal_id — bigint unsigned • MUL
  • peso_meta — decimal(6,3)
  • created_at — datetime • NOT NULL • MUL
  • updated_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_status → status
  • idx_prioridade → prioridade
  • idx_contrato → id_contrato
  • idx_responsavel → responsavel_id
  • idx_data_fim → data_fim_prevista
  • idx_meta_principal → meta_principal_id
  • idx_created_at → created_at
  • idx_periodo_previsto → data_inicio, data_fim_prevista
  • idx_criador → criador_id

wpjy_tarefas_arquivos

  • id — bigint unsigned • NOT NULL • PRI
  • id_tarefa — bigint unsigned • NOT NULL • MUL
  • media_id — bigint unsigned
  • url — varchar(1024)
  • filename — varchar(255)
  • mime — varchar(120)
  • size — bigint unsigned
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_tarefa → id_tarefa

wpjy_tarefas_atribuidos

  • id — bigint unsigned • NOT NULL • PRI
  • id_tarefa — bigint unsigned • NOT NULL • MUL
  • alvo_tipo — enum('usuario','equipe','profissional','empresa') • NOT NULL • MUL
  • alvo_id — bigint unsigned • NOT NULL
  • papel — enum('responsavel','colaborador','observador') • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_resp_unico → id_tarefa, alvo_tipo, alvo_id, papel
  • idx_tarefa → id_tarefa
  • idx_alvo → alvo_tipo, alvo_id

wpjy_tarefas_checklist

  • id — bigint unsigned • NOT NULL • PRI
  • id_tarefa — bigint unsigned • NOT NULL • MUL
  • titulo — varchar(255) • NOT NULL
  • feito — tinyint(1) • NOT NULL
  • feito_por — bigint unsigned
  • feito_em — datetime
  • ordem — smallint unsigned • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_tarefa → id_tarefa
  • idx_ordem → id_tarefa, ordem

wpjy_tarefas_comentarios

  • id — bigint unsigned • NOT NULL • PRI
  • id_tarefa — bigint unsigned • NOT NULL • MUL
  • user_id — bigint unsigned • NOT NULL • MUL
  • comentario — longtext • NOT NULL
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_tarefa → id_tarefa
  • idx_user → user_id

wpjy_tarefas_log

  • id — bigint unsigned • NOT NULL • PRI
  • id_tarefa — bigint unsigned • NOT NULL • MUL
  • user_id — bigint unsigned • MUL
  • acao — varchar(80) • NOT NULL • MUL
  • de_val — text
  • para_val — text
  • created_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • idx_tarefa → id_tarefa
  • idx_user → user_id
  • idx_acao → acao

wpjy_tarefas_relacionadas

  • id — bigint unsigned • NOT NULL • PRI
  • id_tarefa — bigint unsigned • NOT NULL • MUL
  • id_relacionada — bigint unsigned • NOT NULL
  • rel_tipo — enum('depende_de','bloqueia','duplica','relacionada') • NOT NULL

Índices

  • PRIMARY → id
  • uq_rel → id_tarefa, id_relacionada, rel_tipo
  • idx_tarefa → id_tarefa

wpjy_telas

  • id — int • NOT NULL • PRI
  • arquivo — varchar(60) • UNI
  • nome — varchar(60) • MUL
  • descricao — varchar(50)
  • icone — varchar(50)
  • ativa — int • MUL
  • ajuda — text

Índices

  • PRIMARY → id
  • arquivo → arquivo
  • uq_telas_arquivo → arquivo
  • ix_telas_nome → nome
  • ix_telas_ativa → ativa

wpjy_telas_categorias

  • id_tela — int • NOT NULL • PRI
  • id_categoria — int • NOT NULL • PRI

Índices

  • PRIMARY → id_tela, id_categoria

wpjy_term_relationships

  • object_id — bigint unsigned • NOT NULL • PRI
  • term_taxonomy_id — bigint unsigned • NOT NULL • PRI
  • term_order — int • NOT NULL

Índices

  • PRIMARY → object_id, term_taxonomy_id
  • term_taxonomy_id → term_taxonomy_id

wpjy_term_taxonomy

  • term_taxonomy_id — bigint unsigned • NOT NULL • PRI
  • term_id — bigint unsigned • NOT NULL • MUL
  • taxonomy — varchar(32) • NOT NULL • MUL
  • description — longtext • NOT NULL
  • parent — bigint unsigned • NOT NULL
  • count — bigint • NOT NULL

Índices

  • PRIMARY → term_taxonomy_id
  • term_id_taxonomy → term_id, taxonomy
  • taxonomy → taxonomy

wpjy_termmeta

  • meta_id — bigint unsigned • NOT NULL • PRI
  • term_id — bigint unsigned • NOT NULL • MUL
  • meta_key — varchar(255) • MUL
  • meta_value — longtext

Índices

  • PRIMARY → meta_id
  • term_id → term_id
  • meta_key → meta_key

wpjy_terms

  • term_id — bigint unsigned • NOT NULL • PRI
  • name — varchar(200) • NOT NULL • MUL
  • slug — varchar(200) • NOT NULL • MUL
  • term_group — bigint • NOT NULL

Índices

  • PRIMARY → term_id
  • slug → slug
  • name → name

wpjy_tickets

  • id — int • NOT NULL • PRI
  • title — varchar(255) • NOT NULL
  • msg — text • NOT NULL
  • email — varchar(255) • NOT NULL
  • created — datetime • NOT NULL
  • status — enum('open','closed','resolved','waiting') • NOT NULL
  • starred — tinyint(1) • NOT NULL • MUL
  • important — tinyint(1) • NOT NULL • MUL
  • label — varchar(50) • MUL
  • user_id — int • NOT NULL • MUL
  • depto — varchar(50)
  • plano — int
  • priority — varchar(50)
  • ip — varchar(50) • NOT NULL
  • notify — int
  • contrato — int
  • tipo — enum('interno','pj','cliente','externo','changelog')

Índices

  • PRIMARY → id
  • idx_user_status → user_id, status
  • idx_label → label
  • idx_starred → starred
  • idx_important → important

wpjy_tickets_attachments

  • id — int • NOT NULL • PRI
  • ticket_id — int • NOT NULL
  • comment_id — int
  • file — text • NOT NULL
  • created — datetime • NOT NULL
  • ext — varchar(50)

Índices

  • PRIMARY → id

wpjy_tickets_comments

  • id — int • NOT NULL • PRI
  • ticket_id — int • NOT NULL
  • msg — text • NOT NULL
  • created — datetime • NOT NULL
  • user_id — int
  • ip — varchar(50)

Índices

  • PRIMARY → id

wpjy_tiix_events

  • id — bigint unsigned • NOT NULL • PRI
  • created_at — datetime • NOT NULL
  • event — varchar(80) • NOT NULL • MUL
  • kind — varchar(40) • MUL
  • id_contrato — int
  • step — tinyint
  • path — varchar(255)
  • referrer — varchar(255)
  • ip — varbinary(16)
  • ua — varchar(255)
  • device_type — varchar(20)
  • os — varchar(40)
  • browser — varchar(40)
  • user_id — bigint
  • fp — char(40) • MUL
  • extras — mediumtext

Índices

  • PRIMARY → id
  • idx_ev_dt → event, created_at
  • idx_kind_step → kind, step
  • idx_fp_dt → fp, created_at

wpjy_tipos_afiliados

  • id — int • NOT NULL • PRI
  • nome — varchar(255) • NOT NULL
  • descricao — text
  • ativo — tinyint(1)
  • mensalidade_nivel1 — decimal(10,2)
  • mensalidade_nivel2 — decimal(10,2)
  • mensalidade_nivel3 — decimal(10,2)
  • mensalidade_nivel4 — decimal(10,2)
  • saque_minimo — decimal(10,2)
  • adesao — decimal(10,2)
  • adesao_ascendente — decimal(10,2)
  • comissao_tipo — char(1)
  • contrato — int
  • plano — int

Índices

  • PRIMARY → id

wpjy_tracy_logs

  • id — int • NOT NULL • PRI
  • message — text
  • priority — int
  • created_at — datetime
  • location — varchar(255)

Índices

  • PRIMARY → id

wpjy_tracy_logs_new

  • id — int • NOT NULL • PRI
  • level — varchar(50)
  • code — int
  • error — varchar(255)
  • description — text
  • file — varchar(255)
  • url — varchar(255)
  • referer — varchar(255)
  • line — int
  • context — text
  • created_at — datetime

Índices

  • PRIMARY → id

wpjy_uploads

  • id — int • NOT NULL • PRI
  • nome — varchar(200)
  • url — text
  • localpath — text
  • data_criacao — datetime • NOT NULL

Índices

  • PRIMARY → id

wpjy_user_activity

  • id — bigint unsigned • NOT NULL • PRI
  • user_id — bigint unsigned • NOT NULL • MUL
  • tipo — varchar(32) • NOT NULL • MUL
  • ip — varchar(45)
  • user_agent — varchar(255)
  • meta — json
  • data — datetime • NOT NULL • MUL

Índices

  • PRIMARY → id
  • idx_user_data → user_id, data
  • idx_tipo → tipo
  • idx_data → data

wpjy_user_custom_field_values

  • id — int • NOT NULL • PRI
  • user_id — int
  • field_id — int
  • field_value — text
  • created_at — timestamp • NOT NULL

Índices

  • PRIMARY → id

wpjy_user_custom_fields

  • id — int • NOT NULL • PRI
  • contrato — int • NOT NULL • MUL
  • field_name — varchar(255) • NOT NULL
  • field_type — varchar(20) • NOT NULL
  • options — text
  • is_required — tinyint(1)
  • is_visible — tinyint(1)
  • export — tinyint(1)
  • created_at — timestamp • NOT NULL
  • updated_at — timestamp • NOT NULL

Índices

  • PRIMARY → id
  • uq_ucf_contrato_name → contrato, field_name
  • idx_ucf_contrato → contrato
  • idx_ucf_contrato_visible → contrato, is_visible

wpjy_user_dados

  • id — int • NOT NULL • PRI
  • user_id — bigint unsigned • NOT NULL • UNI
  • nome_mae — varchar(100)
  • cpf — varchar(12) • MUL
  • cnpj — varchar(50)
  • nome — varchar(100) • NOT NULL
  • fantasia — varchar(250)
  • data_nascimento — date
  • sexo — varchar(1)
  • cep — varchar(10)
  • logradouro — varchar(250)
  • numero — varchar(10)
  • complemento — varchar(20)
  • bairro — varchar(45)
  • cidade — varchar(45)
  • uf — varchar(2)
  • telefone — varchar(20)
  • contato_emerg_nome — varchar(190)
  • contato_emerg_parentesco — varchar(150)
  • contato_emerg_telefone — varchar(20)
  • contato_extra_nome — varchar(190)
  • contato_extra_telefone — varchar(20)
  • celular — varchar(20)
  • email — varchar(100) • MUL
  • profissao — varchar(250)
  • facebook — varchar(100)
  • instagram — varchar(100)
  • login — varchar(80) • MUL
  • campo_adicional — varchar(100)
  • cartao — varchar(50)
  • sorteio — varchar(10)
  • foto — varchar(250)
  • razao — varchar(250)
  • status — varchar(20)
  • banco — varchar(50)
  • agencia — varchar(50)
  • conta — varchar(50)
  • chave_pix — varchar(255)
  • chave_pix_tipo — varchar(50)
  • conta_gateway — varchar(255)
  • cc_token — text
  • indicador — int
  • vendedor — int
  • divulgador — int
  • representante — int
  • visita — int
  • contrato — int • MUL
  • ativo — int
  • campanha — varchar(50)
  • nacionalidade — varchar(250)
  • titular — int
  • parentesco — varchar(150)
  • tipo — varchar(150)
  • signature — text
  • pais — varchar(80)

Índices

  • PRIMARY → id
  • user_id_un → user_id
  • user_id → user_id
  • cpf → cpf
  • login → login
  • idx_user_dados_user_id → user_id
  • idx_user_dados_contrato → contrato
  • idx_user_dados_email → email
  • idx_ud_email → email

wpjy_user_dependentes

  • id — int • NOT NULL • PRI
  • user_id — int • NOT NULL • MUL
  • nome — varchar(80)
  • nome_mae — varchar(80)
  • parentesco — varchar(80)
  • data_criacao — datetime
  • data_nascimento — date
  • cpf — varchar(20)

Índices

  • PRIMARY → id
  • user_id → user_id

wpjy_user_tipo_kit_map

  • id — bigint unsigned • NOT NULL • PRI
  • user_tipo — varchar(40) • NOT NULL • MUL
  • kit_id — bigint unsigned • NOT NULL • MUL
  • prioridade — int unsigned • NOT NULL

Índices

  • PRIMARY → id
  • uq_tipo_kit → user_tipo, kit_id
  • ux_user_tipo_kit → user_tipo, kit_id
  • idx_tipo → user_tipo
  • fk_utk_kit → kit_id
  • ix_user_tipo_prioridade → user_tipo, prioridade

wpjy_usermeta

  • umeta_id — bigint unsigned • NOT NULL • PRI
  • user_id — bigint unsigned • NOT NULL • MUL
  • meta_key — varchar(255) • MUL
  • meta_value — longtext

Índices

  • PRIMARY → umeta_id
  • user_id → user_id
  • meta_key → meta_key

wpjy_users

  • ID — bigint unsigned • NOT NULL • PRI
  • user_login — varchar(60) • NOT NULL • MUL
  • user_pass — varchar(255) • NOT NULL
  • user_nicename — varchar(50) • NOT NULL • MUL
  • user_email — varchar(100) • NOT NULL • MUL
  • user_url — varchar(100) • NOT NULL
  • user_registered — datetime • NOT NULL • MUL
  • user_activation_key — varchar(255) • NOT NULL
  • user_status — int • NOT NULL
  • display_name — varchar(250) • NOT NULL

Índices

  • PRIMARY → ID
  • user_login_key → user_login
  • user_nicename → user_nicename
  • user_email → user_email
  • idx_user_registered → user_registered
  • idx_user_email → user_email

wpjy_usuario_contratos

  • id — int • NOT NULL • PRI
  • id_usuario — bigint unsigned • NOT NULL • MUL
  • id_contrato — int • NOT NULL • MUL

Índices

  • PRIMARY → id
  • id_usuario → id_usuario, id_contrato
  • uq_usuario_contrato → id_usuario, id_contrato
  • id_contrato → id_contrato
  • idx_usuario_contratos_id_usuario → id_usuario
  • idx_usuario_contratos_id_contrato → id_contrato
  • idx_usuario_contratos_user → id_usuario, id_contrato
  • idx_usuario → id_usuario

wpjy_usuario_grupo_permissao

  • id — int • NOT NULL • PRI
  • id_usuario — int • NOT NULL • MUL
  • id_grupo — int • NOT NULL • MUL

Índices

  • PRIMARY → id
  • uq_usuario_grupo → id_usuario, id_grupo
  • id_grupo → id_grupo
  • idx_usuario_grupo_id_usuario → id_usuario
  • idx_usuario_grupo_id_grupo → id_grupo
  • idx_usuario_grupo_user → id_usuario, id_grupo
  • idx_ug_user → id_usuario
  • idx_ug_grup → id_grupo
  • idx_usuario → id_usuario

wpjy_v_role_bindings_current

  • id — bigint unsigned • NOT NULL
  • role_slug — varchar(64) • NOT NULL
  • scope_type — enum('global','contrato','equipe') • NOT NULL
  • scope_id — bigint unsigned
  • principal_type — enum('usuario','equipe','grupo') • NOT NULL
  • principal_id — bigint unsigned • NOT NULL
  • is_primary — tinyint(1) • NOT NULL
  • priority — int unsigned • NOT NULL
  • valid_from — datetime • NOT NULL
  • valid_to — datetime
  • created_by — bigint unsigned
  • created_at — datetime • NOT NULL
  • updated_at — datetime

wpjy_vendedores

  • id — int • NOT NULL • PRI
  • id_representante — int • NOT NULL • MUL
  • nome — varchar(150) • NOT NULL
  • tipo — varchar(2) • NOT NULL
  • cpf — varchar(15)
  • cnpj — varchar(18)
  • email — varchar(250) • NOT NULL
  • celular — varchar(15) • NOT NULL
  • telefone — varchar(15) • NOT NULL
  • banco — varchar(4) • NOT NULL
  • agencia — varchar(8) • NOT NULL
  • conta — varchar(12) • NOT NULL
  • data_nascimento — datetime
  • tipo_conta — varchar(20) • NOT NULL
  • logradouro — varchar(250) • NOT NULL
  • numero — varchar(50) • NOT NULL
  • complemento — varchar(50) • NOT NULL
  • bairro — varchar(80) • NOT NULL
  • cidade — varchar(80) • NOT NULL
  • uf — varchar(2) • NOT NULL
  • cep — varchar(10) • NOT NULL
  • data_cadastro — datetime • NOT NULL
  • suspenso — tinyint
  • lixeira — tinyint • NOT NULL
  • nome_indicador — varchar(8)
  • senha — varchar(255)
  • cartao — varchar(50)

Índices

  • PRIMARY → id
  • id_representante → id_representante

wpjy_vendedores_faturas

  • id — int • NOT NULL • PRI
  • id_fatura — int • NOT NULL • MUL
  • id_vendedor — int • NOT NULL • MUL
  • data_pagamento — datetime • NOT NULL

Índices

  • PRIMARY → id
  • id_fatura_id_vendedor → id_fatura, id_vendedor
  • id_fatura → id_fatura
  • id_vendedor → id_vendedor

wpjy_visitas

  • id — int • NOT NULL • PRI
  • ip — varchar(20) • NOT NULL
  • data — datetime • NOT NULL

Índices

  • PRIMARY → id

wpjy_vw_perm_baseline_contrato

  • id_contrato — int • NOT NULL
  • ns — varchar(190) • NOT NULL

wpjy_vw_unread_counts

  • user_id — bigint unsigned
  • unread_chat — bigint
  • unread_mail — bigint

wpjy_wpr_rucss_resources

  • id — bigint unsigned • NOT NULL • PRI
  • url — varchar(2000) • NOT NULL • MUL
  • type — varchar(5) • NOT NULL • MUL
  • media — varchar(255)
  • content — longtext
  • hash — varchar(100) • NOT NULL • MUL
  • prewarmup — tinyint unsigned
  • warmup_status — tinyint unsigned
  • modified — datetime
  • last_accessed — datetime • NOT NULL • MUL

Índices

  • PRIMARY → id
  • hash → hash
  • url → url
  • type → type
  • last_accessed → last_accessed

wpjy_wpr_rucss_used_css

  • id — bigint unsigned • NOT NULL • PRI
  • url — varchar(2000) • NOT NULL • MUL
  • css — longtext
  • hash — varchar(32) • MUL
  • unprocessedcss — longtext
  • retries — tinyint(1) • NOT NULL
  • is_mobile — tinyint(1) • NOT NULL
  • job_id — varchar(255) • NOT NULL
  • queue_name — varchar(255) • NOT NULL • MUL
  • status — varchar(255) • NOT NULL
  • modified — timestamp • NOT NULL • MUL
  • last_accessed — timestamp • NOT NULL • MUL

Índices

  • PRIMARY → id
  • url → url, is_mobile
  • modified → modified
  • last_accessed → last_accessed
  • queue_name_index → queue_name
  • hash → hash

wpjy_zapi_logs

  • id — int • NOT NULL • PRI
  • data_cad — datetime
  • contrato — int
  • user_id — int
  • endpoint — varchar(255)
  • tipo — varchar(50)
  • telefone — varchar(20)
  • payload — text
  • response — text
  • erro — text

Índices

  • PRIMARY → id

wpjy_zapi_messages

  • id — bigint unsigned • NOT NULL • PRI
  • external_id — varchar(128) • UNI
  • quoted_msg_id — bigint unsigned • MUL
  • thread_id — bigint unsigned • NOT NULL • MUL
  • from_me — tinyint(1) • NOT NULL
  • ack — tinyint unsigned • NOT NULL
  • sender — varchar(128)
  • body — longtext
  • msg_type — varchar(32) • NOT NULL
  • media_url — varchar(1024)
  • created_at — datetime • NOT NULL • MUL

Índices

  • PRIMARY → id
  • uq_external_id → external_id
  • idx_thread → thread_id
  • idx_thread_created → thread_id, created_at
  • idx_created → created_at
  • idx_quoted → quoted_msg_id

wpjy_zapi_threads

  • id — bigint unsigned • NOT NULL • PRI
  • id_contrato — int unsigned • MUL
  • remote_jid — varchar(64) • NOT NULL • MUL
  • subject — varchar(255)
  • last_msg_id — bigint unsigned • MUL
  • last_msg_ts — datetime • MUL
  • status — enum('open','closed') • NOT NULL • MUL
  • created_at — datetime • NOT NULL
  • updated_at — datetime • NOT NULL

Índices

  • PRIMARY → id
  • uq_jid_contrato → remote_jid, id_contrato
  • idx_contrato → id_contrato
  • idx_status → status
  • idx_last_ts → last_msg_ts
  • idx_last_msg_id → last_msg_id

wpjy_zapi_threads_user

  • id — bigint unsigned • NOT NULL • PRI
  • thread_id — bigint unsigned • NOT NULL • MUL
  • user_id — bigint unsigned • NOT NULL • MUL
  • last_seen_msg — bigint unsigned • MUL
  • last_seen_at — datetime

Índices

  • PRIMARY → id
  • uq_thread_user → thread_id, user_id
  • idx_user → user_id
  • idx_last_seen_msg → last_seen_msg

wpjy_zapi_webhook_log

  • id — bigint unsigned • NOT NULL • PRI
  • event — varchar(64) • NOT NULL • MUL
  • external_id — varchar(128)
  • payload — json
  • received_at — datetime • NOT NULL • MUL
  • processed — tinyint(1) • NOT NULL • MUL
  • error — text

Índices

  • PRIMARY → id
  • uq_external_event → event, external_id
  • idx_processed → processed
  • idx_received → received_at