-- name: ListIncoming :many
SELECT * FROM "Incoming"
ORDER BY "id";


-- name: CreateIncoming :one
INSERT INTO "Incoming" (
    "incident_number", "description", "short_description", "urgency", "impact", "state", "external_id", "work_notes", "assignment_group", "assigned_to", "category", "subcategory", "created_at"
) VALUES(
    ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
)
RETURNING *;

-- name: CreateIncident :one
INSERT INTO incidents (external_id)
VALUES (?)
RETURNING id;
