-- name: CreateReasonRejection :one
INSERT INTO reasonrejections (
    reasoncode,
    reasondescription
 ) VALUES (
    $1, $2
 ) RETURNING *;

-- name: GetReasonRejection :one
SELECT * FROM reasonrejections
WHERE id = $1 LIMIT 1;

-- name: ListReasonRejections :many
SELECT * FROM reasonrejections;

-- name: UpdateReasonRejection :one
UPDATE reasonrejections
  set 
    reasoncode= $2,
    reasondescription= $3
WHERE id = $1
RETURNING *;

-- name: DeleteReasonRejection :exec
DELETE FROM reasonrejections WHERE id= $1;