From 12e79cc6d69170ed6fabccbc2a1368ff4178d5f6 Mon Sep 17 00:00:00 2001 From: Rafael Lopes Date: Mon, 18 May 2026 11:15:29 -0300 Subject: [PATCH] =?UTF-8?q?FEAT:=20Implementa=20chat=20whatsapp=20e=20atri?= =?UTF-8?q?bui=C3=A7=C3=B5es=20de=20conversas=20-=20Atualiza=C3=A7=C3=A3o?= =?UTF-8?q?=20e=20polimento=20dos=20arquivos=20'.gitignore'=20(raiz,=20fro?= =?UTF-8?q?ntend,=20backend)=20para=20ignorar=20sess=C3=B5es=20locais=20do?= =?UTF-8?q?=20Puppeteer,=20bancos=20de=20persist=C3=AAncia=20JSON=20locais?= =?UTF-8?q?,=20dumps=20tempor=C3=A1rios=20de=20testes=20e=20logs=20de=20de?= =?UTF-8?q?senvolvimento.=20-=20Adi=C3=A7=C3=A3o=20da=20migration=20com=20?= =?UTF-8?q?atribui=C3=A7=C3=B5es=20aos=20chats?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 18 ++++++++++++++---- database/migrations/004_whatsapp.sql | 8 ++++++++ 2 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 database/migrations/004_whatsapp.sql diff --git a/.gitignore b/.gitignore index c0e58f5..bc13c1b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,17 @@ node_modules dist -frontend/node_modules -frontend/dist +.env* +*.log .DS_Store -.env.development -.env.production \ No newline at end of file + +# Backend Specific Ignore +backend/node_modules +backend/dist +backend/whatsapp-session +backend/whatsapp-chats-persist.json +backend/all-chats-dump.json +backend/test-api-out.json + +# Frontend Specific Ignore +frontend/node_modules +frontend/dist \ No newline at end of file diff --git a/database/migrations/004_whatsapp.sql b/database/migrations/004_whatsapp.sql new file mode 100644 index 0000000..1633d32 --- /dev/null +++ b/database/migrations/004_whatsapp.sql @@ -0,0 +1,8 @@ +CREATE TABLE IF NOT EXISTS whatsapp_chat_atribuicoes ( + id SERIAL PRIMARY KEY, + chat_id VARCHAR(255) NOT NULL, + user_id SERIAL REFERENCES usuarios(id) ON DELETE CASCADE, + area_id SERIAL REFERENCES areas(id) ON DELETE SET NULL, + assigned_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP, + UNIQUE(chat_id) +);