Initial commit of Descrybe v2 without local scratch artifacts.
Drop one-shot tmp/axe scripts and agent i18n scratch so the Gitea tree is deployable.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
-- name: CreateInvite :one
|
||||
INSERT INTO invites (company_id, email, role, token, invited_by, expires_at)
|
||||
VALUES ($1, $2, $3, $4, $5, $6)
|
||||
RETURNING *;
|
||||
|
||||
-- name: GetInviteByToken :one
|
||||
SELECT * FROM invites WHERE token = $1 LIMIT 1;
|
||||
|
||||
-- name: ListInvitesByCompany :many
|
||||
SELECT * FROM invites
|
||||
WHERE company_id = $1 AND accepted_at IS NULL
|
||||
ORDER BY created_at DESC;
|
||||
|
||||
-- name: AcceptInvite :one
|
||||
UPDATE invites
|
||||
SET accepted_at = now()
|
||||
WHERE id = $1 AND accepted_at IS NULL
|
||||
RETURNING *;
|
||||
Reference in New Issue
Block a user