// Code generated by sqlc. DO NOT EDIT.
// versions:
//   sqlc v1.25.0
// source: invoice_events.sql

package sqlc

import (
	"context"
	"time"
)

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
)
`

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)
	return err
}

const onAMPSubInvoiceSettled = `-- name: OnAMPSubInvoiceSettled :exec
INSERT INTO invoice_events (
    added_at, event_type, invoice_id, set_id
) VALUES (
    $1, 5, $2, $3
)
`

type OnAMPSubInvoiceSettledParams struct {
	AddedAt   time.Time
	InvoiceID int64
	SetID     []byte
}

func (q *Queries) OnAMPSubInvoiceSettled(ctx context.Context, arg OnAMPSubInvoiceSettledParams) error {
	_, err := q.db.ExecContext(ctx, onAMPSubInvoiceSettled, arg.AddedAt, arg.InvoiceID, arg.SetID)
	return err
}

const onInvoiceCanceled = `-- name: OnInvoiceCanceled :exec
INSERT INTO invoice_events (
    added_at, event_type, invoice_id
) VALUES (
    $1, 1, $2
)
`

type OnInvoiceCanceledParams struct {
	AddedAt   time.Time
	InvoiceID int64
}

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
}
