-- name: CreateSite :one
INSERT INTO sites (user_id, domain)
VALUES (?, ?)
RETURNING *;

-- name: GetSiteByID :one
SELECT * FROM sites
WHERE id = ?;

-- name: GetSitesByUserID :many
SELECT * FROM sites
WHERE user_id = ?
ORDER BY created_at DESC;

-- name: GetSiteByDomain :one
SELECT * FROM sites
WHERE domain = ?;

-- name: DeleteSite :exec
DELETE FROM sites
WHERE id = ?;
