2023-11-22 17:23:23 +01:00
|
|
|
-- name: OnInvoiceCreated :exec
|
2023-06-05 21:17:00 -07:00
|
|
|
INSERT INTO invoice_events (
|
2023-11-22 17:23:23 +01:00
|
|
|
added_at, event_type, invoice_id
|
2023-06-05 21:17:00 -07:00
|
|
|
) VALUES (
|
2023-11-22 17:23:23 +01:00
|
|
|
$1, 0, $2
|
2023-06-05 21:17:00 -07:00
|
|
|
);
|
|
|
|
|
2023-11-22 17:23:23 +01:00
|
|
|
-- name: OnInvoiceCanceled :exec
|
|
|
|
INSERT INTO invoice_events (
|
|
|
|
added_at, event_type, invoice_id
|
|
|
|
) VALUES (
|
|
|
|
$1, 1, $2
|
|
|
|
);
|
|
|
|
|
|
|
|
-- name: OnInvoiceSettled :exec
|
|
|
|
INSERT INTO invoice_events (
|
|
|
|
added_at, event_type, invoice_id
|
|
|
|
) VALUES (
|
|
|
|
$1, 2, $2
|
|
|
|
);
|
|
|
|
|
|
|
|
-- name: OnAMPSubInvoiceCreated :exec
|
|
|
|
INSERT INTO invoice_events (
|
|
|
|
added_at, event_type, invoice_id, set_id
|
|
|
|
) VALUES (
|
|
|
|
$1, 3, $2, $3
|
|
|
|
);
|
2023-06-05 21:17:00 -07:00
|
|
|
|
2023-11-22 17:23:23 +01:00
|
|
|
-- name: OnAMPSubInvoiceCanceled :exec
|
|
|
|
INSERT INTO invoice_events (
|
|
|
|
added_at, event_type, invoice_id, set_id
|
|
|
|
) VALUES (
|
|
|
|
$1, 4, $2, $3
|
|
|
|
);
|
|
|
|
|
|
|
|
-- name: OnAMPSubInvoiceSettled :exec
|
|
|
|
INSERT INTO invoice_events (
|
|
|
|
added_at, event_type, invoice_id, set_id
|
|
|
|
) VALUES (
|
|
|
|
$1, 5, $2, $3
|
|
|
|
);
|