mirror of
https://github.com/abhinavxd/libredesk.git
synced 2025-11-03 21:43:35 +00:00
- tiptap editor fixes for hardlines. - set app font to jakarta, fix shadcn components having a different font. - UI improvements on /admin - UI improvements on inbox tab.
67 lines
912 B
SQL
67 lines
912 B
SQL
-- name: get
|
|
SELECT
|
|
id,
|
|
name,
|
|
message_content,
|
|
created_at,
|
|
updated_at,
|
|
visibility,
|
|
user_id,
|
|
team_id,
|
|
actions,
|
|
usage_count
|
|
FROM
|
|
macros
|
|
WHERE
|
|
id = $1;
|
|
|
|
-- name: get-all
|
|
SELECT
|
|
id,
|
|
name,
|
|
message_content,
|
|
created_at,
|
|
updated_at,
|
|
visibility,
|
|
user_id,
|
|
team_id,
|
|
actions,
|
|
usage_count
|
|
FROM
|
|
macros
|
|
ORDER BY
|
|
updated_at DESC;
|
|
|
|
-- name: create
|
|
INSERT INTO
|
|
macros (name, message_content, user_id, team_id, visibility, actions)
|
|
VALUES
|
|
($1, $2, $3, $4, $5, $6);
|
|
|
|
-- name: update
|
|
UPDATE
|
|
macros
|
|
SET
|
|
name = $2,
|
|
message_content = $3,
|
|
user_id = $4,
|
|
team_id = $5,
|
|
visibility = $6,
|
|
actions = $7,
|
|
updated_at = NOW()
|
|
WHERE
|
|
id = $1;
|
|
|
|
-- name: delete
|
|
DELETE FROM
|
|
macros
|
|
WHERE
|
|
id = $1;
|
|
|
|
-- name: increment-usage-count
|
|
UPDATE
|
|
macros
|
|
SET
|
|
usage_count = usage_count + 1
|
|
WHERE
|
|
id = $1; |