Files
libredesk/internal/role/queries.sql
Abhinav Raut 634fc66e9f Translate welcome to libredesk email subject
- Update all SQL queries to add missing columns

- Update the create conversation API to allow setting the initiator of a conversation. For example, we might want to use this API to create a conversation on behalf of a customer, with the first message coming from the customer instead of the agent. This param allows this.

- Minor refactors and clean up

- Tidy go.mod

- Rename structs to reflect purpose

- Create focus structs for scanning JSON payloads for clarity.
2025-08-28 00:34:56 +05:30

14 lines
478 B
SQL

-- name: get-all
SELECT id, created_at, updated_at, name, description, permissions FROM roles;
-- name: get-role
SELECT id, created_at, updated_at, name, description, permissions FROM roles where id = $1;
-- name: delete-role
DELETE FROM roles where id = $1;
-- name: insert-role
INSERT INTO roles (name, description, permissions) VALUES ($1, $2, $3) RETURNING *;
-- name: update-role
UPDATE roles SET name = $2, description = $3, permissions = $4 WHERE id = $1 RETURNING *;