2023-05-30 07:37:48 -07:00
|
|
|
// Code generated by sqlc. DO NOT EDIT.
|
|
|
|
// versions:
|
2023-09-22 12:30:15 -07:00
|
|
|
// sqlc v1.25.0
|
2023-05-30 07:37:48 -07:00
|
|
|
// source: invoice_events.sql
|
|
|
|
|
|
|
|
package sqlc
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
2023-11-22 17:23:23 +01:00
|
|
|
const onAMPSubInvoiceCanceled = `-- name: OnAMPSubInvoiceCanceled :exec
|
|
|
|
INSERT INTO invoice_events (
|
|
|
|
added_at, event_type, invoice_id, set_id
|
|
|
|
) VALUES (
|
|
|
|
$1, 4, $2, $3
|
|
|
|
)
|
|
|
|
`
|
|
|
|
|
|
|
|
type OnAMPSubInvoiceCanceledParams struct {
|
|
|
|
AddedAt time.Time
|
|
|
|
InvoiceID int64
|
|
|
|
SetID []byte
|
|
|
|
}
|
|
|
|
|
|
|
|
func (q *Queries) OnAMPSubInvoiceCanceled(ctx context.Context, arg OnAMPSubInvoiceCanceledParams) error {
|
|
|
|
_, err := q.db.ExecContext(ctx, onAMPSubInvoiceCanceled, arg.AddedAt, arg.InvoiceID, arg.SetID)
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
const onAMPSubInvoiceCreated = `-- name: OnAMPSubInvoiceCreated :exec
|
|
|
|
INSERT INTO invoice_events (
|
|
|
|
added_at, event_type, invoice_id, set_id
|
|
|
|
) VALUES (
|
|
|
|
$1, 3, $2, $3
|
|
|
|
)
|
2023-05-30 07:37:48 -07:00
|
|
|
`
|
|
|
|
|
2023-11-22 17:23:23 +01:00
|
|
|
type OnAMPSubInvoiceCreatedParams struct {
|
|
|
|
AddedAt time.Time
|
|
|
|
InvoiceID int64
|
|
|
|
SetID []byte
|
|
|
|
}
|
|
|
|
|
|
|
|
func (q *Queries) OnAMPSubInvoiceCreated(ctx context.Context, arg OnAMPSubInvoiceCreatedParams) error {
|
|
|
|
_, err := q.db.ExecContext(ctx, onAMPSubInvoiceCreated, arg.AddedAt, arg.InvoiceID, arg.SetID)
|
2023-05-30 07:37:48 -07:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
2023-11-22 17:23:23 +01:00
|
|
|
const onAMPSubInvoiceSettled = `-- name: OnAMPSubInvoiceSettled :exec
|
2023-05-30 07:37:48 -07:00
|
|
|
INSERT INTO invoice_events (
|
2023-11-22 17:23:23 +01:00
|
|
|
added_at, event_type, invoice_id, set_id
|
2023-05-30 07:37:48 -07:00
|
|
|
) VALUES (
|
2023-11-22 17:23:23 +01:00
|
|
|
$1, 5, $2, $3
|
2023-05-30 07:37:48 -07:00
|
|
|
)
|
|
|
|
`
|
|
|
|
|
2023-11-22 17:23:23 +01:00
|
|
|
type OnAMPSubInvoiceSettledParams struct {
|
|
|
|
AddedAt time.Time
|
|
|
|
InvoiceID int64
|
|
|
|
SetID []byte
|
2023-05-30 07:37:48 -07:00
|
|
|
}
|
|
|
|
|
2023-11-22 17:23:23 +01:00
|
|
|
func (q *Queries) OnAMPSubInvoiceSettled(ctx context.Context, arg OnAMPSubInvoiceSettledParams) error {
|
|
|
|
_, err := q.db.ExecContext(ctx, onAMPSubInvoiceSettled, arg.AddedAt, arg.InvoiceID, arg.SetID)
|
2023-05-30 07:37:48 -07:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
2023-11-22 17:23:23 +01:00
|
|
|
const onInvoiceCanceled = `-- name: OnInvoiceCanceled :exec
|
|
|
|
INSERT INTO invoice_events (
|
|
|
|
added_at, event_type, invoice_id
|
|
|
|
) VALUES (
|
|
|
|
$1, 1, $2
|
|
|
|
)
|
2023-05-30 07:37:48 -07:00
|
|
|
`
|
|
|
|
|
2023-11-22 17:23:23 +01:00
|
|
|
type OnInvoiceCanceledParams struct {
|
|
|
|
AddedAt time.Time
|
|
|
|
InvoiceID int64
|
2023-05-30 07:37:48 -07:00
|
|
|
}
|
|
|
|
|
2023-11-22 17:23:23 +01:00
|
|
|
func (q *Queries) OnInvoiceCanceled(ctx context.Context, arg OnInvoiceCanceledParams) error {
|
|
|
|
_, err := q.db.ExecContext(ctx, onInvoiceCanceled, arg.AddedAt, arg.InvoiceID)
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
const onInvoiceCreated = `-- name: OnInvoiceCreated :exec
|
|
|
|
INSERT INTO invoice_events (
|
|
|
|
added_at, event_type, invoice_id
|
|
|
|
) VALUES (
|
|
|
|
$1, 0, $2
|
|
|
|
)
|
|
|
|
`
|
|
|
|
|
|
|
|
type OnInvoiceCreatedParams struct {
|
|
|
|
AddedAt time.Time
|
|
|
|
InvoiceID int64
|
|
|
|
}
|
|
|
|
|
|
|
|
func (q *Queries) OnInvoiceCreated(ctx context.Context, arg OnInvoiceCreatedParams) error {
|
|
|
|
_, err := q.db.ExecContext(ctx, onInvoiceCreated, arg.AddedAt, arg.InvoiceID)
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
const onInvoiceSettled = `-- name: OnInvoiceSettled :exec
|
|
|
|
INSERT INTO invoice_events (
|
|
|
|
added_at, event_type, invoice_id
|
|
|
|
) VALUES (
|
|
|
|
$1, 2, $2
|
|
|
|
)
|
|
|
|
`
|
|
|
|
|
|
|
|
type OnInvoiceSettledParams struct {
|
|
|
|
AddedAt time.Time
|
|
|
|
InvoiceID int64
|
|
|
|
}
|
|
|
|
|
|
|
|
func (q *Queries) OnInvoiceSettled(ctx context.Context, arg OnInvoiceSettledParams) error {
|
|
|
|
_, err := q.db.ExecContext(ctx, onInvoiceSettled, arg.AddedAt, arg.InvoiceID)
|
|
|
|
return err
|
2023-05-30 07:37:48 -07:00
|
|
|
}
|