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) +);