-- name: CreateDomain :one
INSERT INTO domains (id, project_id, provider_account_id, zone_name, zone_id, template_id)
VALUES ($1, $2, $3, $4, $5, $6)
RETURNING *;

-- name: GetDomain :one
SELECT * FROM domains WHERE id = $1 AND project_id = $2;

-- name: ListDomains :many
SELECT * FROM domains WHERE project_id = $1 ORDER BY created_at;

-- name: DeleteDomain :exec
DELETE FROM domains WHERE id = $1 AND project_id = $2;
