mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-09-22 02:23:32 +00:00
88a58c0f3b
- New meta JSONB field in CSAT responses to capture random adhoc data as that might be needed for custom CSAT pages. - Add support prefilled rating for csat pages picked from query param
28 lines
448 B
SQL
28 lines
448 B
SQL
-- name: insert
|
|
INSERT INTO csat_responses (
|
|
conversation_id
|
|
)
|
|
VALUES ($1)
|
|
RETURNING uuid;
|
|
|
|
-- name: get
|
|
SELECT id,
|
|
uuid,
|
|
created_at,
|
|
updated_at,
|
|
conversation_id,
|
|
rating,
|
|
feedback,
|
|
meta,
|
|
response_timestamp
|
|
FROM csat_responses
|
|
WHERE uuid = $1;
|
|
|
|
-- name: update
|
|
UPDATE csat_responses
|
|
SET rating = $2,
|
|
feedback = $3,
|
|
meta = COALESCE($4::jsonb, '{}'),
|
|
response_timestamp = NOW()
|
|
WHERE uuid = $1;
|