14 lines
393 B
SQL
14 lines
393 B
SQL
-- name: CreateInvoiceLineItem :one
|
|
INSERT INTO billing.invoice_line_items (
|
|
invoice_id, subscription_item_id, price_id,
|
|
amount, currency, description, quantity,
|
|
period_start, period_end
|
|
)
|
|
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)
|
|
RETURNING *;
|
|
|
|
-- name: GetInvoiceLineItemsByInvoiceID :many
|
|
SELECT * FROM billing.invoice_line_items
|
|
WHERE invoice_id = $1
|
|
ORDER BY created_at ASC;
|