10 lines
309 B
SQL
10 lines
309 B
SQL
-- name: CreateSubscriptionItem :one
|
|
INSERT INTO billing.subscription_items (subscription_id, product_id, price_id, quantity)
|
|
VALUES ($1, $2, $3, $4)
|
|
RETURNING *;
|
|
|
|
-- name: GetSubscriptionItemsBySubscriptionID :many
|
|
SELECT * FROM billing.subscription_items
|
|
WHERE subscription_id = $1
|
|
ORDER BY created_at ASC;
|