add user management functionality with OTP verification and consent handling, DI introduced
This commit is contained in:
23
internal/db/queries/users.sql
Normal file
23
internal/db/queries/users.sql
Normal file
@ -0,0 +1,23 @@
|
||||
-- name: GetByPhoneNumber :one
|
||||
SELECT *
|
||||
FROM users
|
||||
WHERE phone_number = $1
|
||||
LIMIT 1;
|
||||
|
||||
-- name: GetUserByUUID :one
|
||||
SELECT *
|
||||
FROM users
|
||||
WHERE uuid = $1
|
||||
LIMIT 1;
|
||||
|
||||
-- name: CreateUser :one
|
||||
INSERT INTO users (phone_number)
|
||||
VALUES ($1)
|
||||
RETURNING *;
|
||||
|
||||
-- name: UpdateUserVerified :one
|
||||
UPDATE users
|
||||
SET verified = TRUE,
|
||||
verified_at = CURRENT_TIMESTAMP
|
||||
WHERE uuid = $1
|
||||
RETURNING *;
|
||||
Reference in New Issue
Block a user