-- name: GetUserByOIDCSubject :one
SELECT * FROM identity.users
WHERE oidc_subject = $1;

-- name: CreateUser :one
INSERT INTO identity.users (oidc_subject)
VALUES ($1)
RETURNING *;

-- name: UpdateUserLogin :one
UPDATE identity.users
SET last_login_at = $1, last_login_ip = $2
WHERE user_id = $3
RETURNING *;
