feat: enhance purchase intentions with chat integration and offer tracking
- Added MongoDB chat/message integration for seller responses - Improved seller response validation and default messaging - Integrated automatic chat creation/update when responding to intentions - Added highest custom offer fields to listing queries and models - Enhanced listing data with top offer information for buyers
This commit is contained in:
1 parent
d27526e026
commit
d8e7d5d7e6
19 files changed
+806
-58
No files matched your search
@@ -0,0 +1,17 @@
|
||||
-- Migration 020: Custom offer fields for purchase intentions
|
||||
-- Criado em: 2025-02-07
|
||||
|
||||
ALTER TABLE purchase_intentions
|
||||
ADD COLUMN IF NOT EXISTS custom_offer_amount NUMERIC(12, 2),
|
||||
ADD COLUMN IF NOT EXISTS custom_offer_currency VARCHAR(20),
|
||||
ADD COLUMN IF NOT EXISTS custom_offer_created_at TIMESTAMP WITHOUT TIME ZONE;
|
||||
|
||||
-- Atualizar registros existentes para evitar valores inconsistentes
|
||||
UPDATE purchase_intentions
|
||||
SET custom_offer_amount = NULL,
|
||||
custom_offer_currency = NULL,
|
||||
custom_offer_created_at = NULL
|
||||
WHERE custom_offer_amount IS NOT NULL
|
||||
OR custom_offer_currency IS NOT NULL
|
||||
OR custom_offer_created_at IS NOT NULL;
|
||||
|
||||
Reference in new issue
Block a user