gendesign/tradein-mvp/backend/data/sql/008_crm_fields.sql
TradeIn Deploy 48ccbdafc8 feat(tradein): CRM-поля в форме оценки (#395)
Доп. поля для трейд-ин менеджера: тип собственности, ипотека/
обременение, имя и телефон клиента. На расчёт оценки не влияют —
сохраняются в trade_in_estimates вместе с записью.

- data/sql/008_crm_fields.sql — 4 колонки в trade_in_estimates.
- TradeInEstimateInput + estimator INSERT — приём и сохранение.
- EstimateForm — секция «CRM — для менеджера» (4 поля).

Closes #395
2026-05-22 11:15:15 +05:00

16 lines
769 B
PL/PgSQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- Trade-In MVP — CRM-поля оценки (#395).
-- Операционные поля трейд-ин менеджера: тип собственности, ипотека/обременение,
-- контакт клиента. На расчёт оценки не влияют — хранятся вместе с записью.
BEGIN;
ALTER TABLE trade_in_estimates
ADD COLUMN IF NOT EXISTS ownership_type text,
ADD COLUMN IF NOT EXISTS has_mortgage boolean,
ADD COLUMN IF NOT EXISTS client_name text,
ADD COLUMN IF NOT EXISTS client_phone text;
COMMENT ON COLUMN trade_in_estimates.client_phone IS
'#395 — контакт клиента (CRM). PII — доступ только у трейд-ин менеджера.';
COMMIT;