| 41 | ` |
| 42 | |
| 43 | func (q *Queries) GetOrderByID(ctx context.Context, id string) (Order, error) { |
| 44 | row := q.db.QueryRow(ctx, getOrderByID, id) |
| 45 | var i Order |
| 46 | err := row.Scan( |
| 47 | &i.ID, |
| 48 | &i.UserID, |
| 49 | &i.PlanID, |
| 50 | &i.Email, |
| 51 | &i.StripeSessionID, |
| 52 | &i.StripeSubscriptionID, |
| 53 | &i.StripeCustomerID, |
| 54 | &i.Status, |
| 55 | &i.AmountCents, |
| 56 | &i.Currency, |
| 57 | &i.CreatedAt, |
| 58 | &i.PaidAt, |
| 59 | &i.LastInvoiceID, |
| 60 | ) |
| 61 | return i, err |
| 62 | } |
| 63 | |
| 64 | const getOrderByStripeSession = `-- name: GetOrderByStripeSession :one |
| 65 | SELECT id, user_id, plan_id, email, stripe_session_id, |