214 lines
8.4 KiB
Go
214 lines
8.4 KiB
Go
// Code generated by sqlc. DO NOT EDIT.
|
|
// versions:
|
|
// sqlc v1.29.0
|
|
|
|
package stripe
|
|
|
|
import (
|
|
"database/sql"
|
|
"encoding/json"
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
"github.com/sqlc-dev/pqtype"
|
|
)
|
|
|
|
type Account struct {
|
|
BillingAccountID string `json:"billing_account_id"`
|
|
OrgID string `json:"org_id"`
|
|
Name string `json:"name"`
|
|
Status string `json:"status"`
|
|
Metadata json.RawMessage `json:"metadata"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type CustomerMapping struct {
|
|
BillingAccountID string `json:"billing_account_id"`
|
|
StripeCustomerID sql.NullString `json:"stripe_customer_id"`
|
|
SyncStatus string `json:"sync_status"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type Invoice struct {
|
|
InvoiceID string `json:"invoice_id"`
|
|
BillingAccountID string `json:"billing_account_id"`
|
|
SubscriptionID uuid.NullUUID `json:"subscription_id"`
|
|
Status string `json:"status"`
|
|
AmountDue int32 `json:"amount_due"`
|
|
AmountPaid int32 `json:"amount_paid"`
|
|
Currency string `json:"currency"`
|
|
PeriodStart sql.NullTime `json:"period_start"`
|
|
PeriodEnd sql.NullTime `json:"period_end"`
|
|
DueDate sql.NullTime `json:"due_date"`
|
|
PaidAt sql.NullTime `json:"paid_at"`
|
|
VoidedAt sql.NullTime `json:"voided_at"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type InvoiceLineItem struct {
|
|
LineItemID string `json:"line_item_id"`
|
|
InvoiceID string `json:"invoice_id"`
|
|
SubscriptionItemID uuid.NullUUID `json:"subscription_item_id"`
|
|
PriceID string `json:"price_id"`
|
|
Amount int32 `json:"amount"`
|
|
Currency string `json:"currency"`
|
|
Description sql.NullString `json:"description"`
|
|
Quantity int32 `json:"quantity"`
|
|
PeriodStart sql.NullTime `json:"period_start"`
|
|
PeriodEnd sql.NullTime `json:"period_end"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type InvoiceMapping struct {
|
|
InvoiceID string `json:"invoice_id"`
|
|
StripeInvoiceID sql.NullString `json:"stripe_invoice_id"`
|
|
SyncStatus string `json:"sync_status"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type Payment struct {
|
|
PaymentID string `json:"payment_id"`
|
|
InvoiceID string `json:"invoice_id"`
|
|
BillingAccountID string `json:"billing_account_id"`
|
|
PaymentMethodID uuid.NullUUID `json:"payment_method_id"`
|
|
Amount int32 `json:"amount"`
|
|
Currency string `json:"currency"`
|
|
Status string `json:"status"`
|
|
FailedAt sql.NullTime `json:"failed_at"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type PaymentMapping struct {
|
|
PaymentID string `json:"payment_id"`
|
|
StripePaymentIntentID sql.NullString `json:"stripe_payment_intent_id"`
|
|
SyncStatus string `json:"sync_status"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type PaymentMethod struct {
|
|
PaymentMethodID string `json:"payment_method_id"`
|
|
BillingAccountID string `json:"billing_account_id"`
|
|
PmType string `json:"pm_type"`
|
|
CardBrand sql.NullString `json:"card_brand"`
|
|
CardLast4 sql.NullString `json:"card_last4"`
|
|
CardExpMonth sql.NullInt32 `json:"card_exp_month"`
|
|
CardExpYear sql.NullInt32 `json:"card_exp_year"`
|
|
Funding sql.NullString `json:"funding"`
|
|
IsDefault bool `json:"is_default"`
|
|
DetachedAt sql.NullTime `json:"detached_at"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type PaymentMethodMapping struct {
|
|
PaymentMethodID string `json:"payment_method_id"`
|
|
StripePaymentMethodID sql.NullString `json:"stripe_payment_method_id"`
|
|
SyncStatus string `json:"sync_status"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type Price struct {
|
|
PriceID string `json:"price_id"`
|
|
ProductID string `json:"product_id"`
|
|
Currency string `json:"currency"`
|
|
UnitAmount int32 `json:"unit_amount"`
|
|
RecurringInterval sql.NullString `json:"recurring_interval"`
|
|
TrialPeriodDays sql.NullInt32 `json:"trial_period_days"`
|
|
IsActive bool `json:"is_active"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type PriceMapping struct {
|
|
PriceID string `json:"price_id"`
|
|
StripePriceID sql.NullString `json:"stripe_price_id"`
|
|
SyncStatus string `json:"sync_status"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type Product struct {
|
|
ProductID string `json:"product_id"`
|
|
Name string `json:"name"`
|
|
Description sql.NullString `json:"description"`
|
|
ProductType string `json:"product_type"`
|
|
Metadata pqtype.NullRawMessage `json:"metadata"`
|
|
IsActive bool `json:"is_active"`
|
|
IsPublic bool `json:"is_public"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
EntitlementSetID uuid.NullUUID `json:"entitlement_set_id"`
|
|
}
|
|
|
|
type ProductMapping struct {
|
|
ProductID string `json:"product_id"`
|
|
StripeProductID sql.NullString `json:"stripe_product_id"`
|
|
SyncStatus string `json:"sync_status"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type ProviderConfig struct {
|
|
ID int32 `json:"id"`
|
|
StripeAccountID string `json:"stripe_account_id"`
|
|
Mode string `json:"mode"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type Subscription struct {
|
|
SubscriptionID string `json:"subscription_id"`
|
|
BillingAccountID string `json:"billing_account_id"`
|
|
Status string `json:"status"`
|
|
CurrentPeriodStart sql.NullTime `json:"current_period_start"`
|
|
CurrentPeriodEnd sql.NullTime `json:"current_period_end"`
|
|
CancelAtPeriodEnd bool `json:"cancel_at_period_end"`
|
|
CanceledAt sql.NullTime `json:"canceled_at"`
|
|
EndedAt sql.NullTime `json:"ended_at"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type SubscriptionChange struct {
|
|
ChangeID string `json:"change_id"`
|
|
SubscriptionID string `json:"subscription_id"`
|
|
PreviousStatus sql.NullString `json:"previous_status"`
|
|
NewStatus string `json:"new_status"`
|
|
StripeEventID string `json:"stripe_event_id"`
|
|
ChangedAt time.Time `json:"changed_at"`
|
|
}
|
|
|
|
type SubscriptionItem struct {
|
|
SubscriptionItemID string `json:"subscription_item_id"`
|
|
SubscriptionID string `json:"subscription_id"`
|
|
ProductID string `json:"product_id"`
|
|
PriceID string `json:"price_id"`
|
|
Quantity int32 `json:"quantity"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type SubscriptionItemMapping struct {
|
|
SubscriptionItemID string `json:"subscription_item_id"`
|
|
StripeSubscriptionItemID sql.NullString `json:"stripe_subscription_item_id"`
|
|
SyncStatus string `json:"sync_status"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type SubscriptionMapping struct {
|
|
SubscriptionID string `json:"subscription_id"`
|
|
StripeSubscriptionID sql.NullString `json:"stripe_subscription_id"`
|
|
SyncStatus string `json:"sync_status"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|