Versions in this module Expand all Collapse all v0 v0.2.1 Nov 16, 2026 v0.2.0 Nov 15, 2026 Changes in this version type TableState + Hidden []string + PerPage int + Rows int + func (t TableState) Pager() components.Paginator + func (t TableState) State() components.DataTableState v0.1.0 Oct 24, 2026 Changes in this version + const AccountAction + const AccountRole + const ActivityLogName + const AdminAction + const AdminRole + const CouponsManage + const DefaultLocation + const DefaultNotificationPrefix + const DefaultPageSize + const DefaultPrefix + const FallbackLocale + const InvoicesManage + const InvoicesView + const ManualProviderName + const MaxInstallments + const MaxIntervalMonths + const MaxPageSize + const PaymentsConfirm + const PlansManage + const PlansView + const PublishCommand + const Subscribe + const SubscriptionsCancel + const SubscriptionsManage + const SubscriptionsSweep + const SubscriptionsView + const TranslationGroup + const ViewAdminCoupons + const ViewAdminInvoices + const ViewAdminPlan + const ViewAdminPlans + const ViewAdminSubscriptions + const ViewInvoice + const ViewInvoices + const ViewPlans + const ViewSubscriptions + var DefaultPaths = Paths + var ErrAmountMismatch = errors.New("billing: the amount paid is not the invoice's total") + var ErrBadNotification = errors.New("billing: the request is not a notification this provider understands") + var ErrCouponExhausted = errors.New("billing: the coupon has no uses left") + var ErrCouponExpired = errors.New("billing: the coupon has expired") + var ErrCouponInactive = errors.New("billing: the coupon is not active") + var ErrCouponMinPurchase = errors.New("billing: the price is below the coupon's minimum purchase") + var ErrCouponNotStarted = errors.New("billing: the coupon is not valid yet") + var ErrCouponWrongPlan = errors.New("billing: the coupon does not apply to this plan") + var ErrNotFound = fmt.Errorf("billing: record not found: %w", model.ErrModelNotFound) + var InvoiceStatuses = []InvoiceStatus + var PortuguesePaths = Paths + var SubscriptionStatuses = []SubscriptionStatus + func AddMonths(t time.Time, n int) time.Time + func CheckCoupon(c Coupon, p Plan, at time.Time) error + func Code(raw string) string + func DiscountOf(c Coupon, price int64) int64 + func IsAccountManager(s security.Subject) bool + func IsAdmin(s security.Subject) bool + func Lines(locale string) translation.Lines + func Locales() []string + func PublishedPaths() []string + func Slugify(slug, name string) string + func ViewNames() []string + func ViewPackages() []string + type Account struct + TenantID string + type AdminCouponsPageData struct + PlanOptions []components.SelectOption + Rows []CouponRow + StoreURL string + Table TableState + type AdminInvoicesPageData struct + Rows []InvoiceRow + Table TableState + type AdminPlanPageData struct + BackURL string + Plan PlanForm + UpdateURL string + type AdminPlansPageData struct + NewPlan PlanForm + Rows []PlanRow + StoreURL string + Table TableState + type AdminSubscriptionsPageData struct + Rows []SubscriptionRow + Table TableState + type BillingPolicy struct + func (BillingPolicy) Can(ctx context.Context, s security.Subject, a security.Action, record Account) error + func (BillingPolicy) Writes(a security.Action) bool + type BillingService struct + func NewBillingService(db *data.DB) *BillingService + func (s *BillingService) ActivePlans(ctx context.Context, actor security.Subject) ([]*Plan, error) + func (s *BillingService) AllInvoicesPage(ctx context.Context, actor security.Subject, q PageQuery, perPage int) (Page[Invoice], error) + func (s *BillingService) AllSubscriptionsPage(ctx context.Context, actor security.Subject, q PageQuery, perPage int) (Page[Subscription], error) + func (s *BillingService) CancelAtPeriodEnd(ctx context.Context, actor security.Subject, id string) (*Subscription, error) + func (s *BillingService) CancelNow(ctx context.Context, actor security.Subject, id string) (*Subscription, error) + func (s *BillingService) ConfirmManually(ctx context.Context, actor security.Subject, id string, in ManualPayment) (*Invoice, error) + func (s *BillingService) CouponsPage(ctx context.Context, actor security.Subject, q PageQuery, perPage int) (Page[*Coupon], error) + func (s *BillingService) CreateCoupon(ctx context.Context, actor security.Subject, in CouponRequest) (*Coupon, error) + func (s *BillingService) CreatePlan(ctx context.Context, actor security.Subject, in PlanRequest) (*Plan, error) + func (s *BillingService) HandleNotification(ctx context.Context, providerName string, r *http.Request) (*Invoice, error) + func (s *BillingService) Invoice(ctx context.Context, actor security.Subject, id string) (*Invoice, error) + func (s *BillingService) InvoicesPage(ctx context.Context, actor security.Subject, q PageQuery, perPage int) (Page[*Invoice], error) + func (s *BillingService) Plan(ctx context.Context, actor security.Subject, id string) (*Plan, error) + func (s *BillingService) PlanBySlug(ctx context.Context, actor security.Subject, slug string) (*Plan, error) + func (s *BillingService) PlanNames(ctx context.Context, actor security.Subject) (map[string]string, error) + func (s *BillingService) PlansPage(ctx context.Context, actor security.Subject, q PageQuery, perPage int) (Page[*Plan], error) + func (s *BillingService) RefreshInvoice(ctx context.Context, actor security.Subject, id string) (*Invoice, error) + func (s *BillingService) Renew(ctx context.Context, actor security.Subject, subscriptionID, provider string) (*CheckoutResult, error) + func (s *BillingService) ResumeSubscription(ctx context.Context, actor security.Subject, id string) (*Subscription, error) + func (s *BillingService) ServingSubscriptions(ctx context.Context, actor security.Subject) ([]*Subscription, error) + func (s *BillingService) SetCouponActive(ctx context.Context, actor security.Subject, id string, active bool) (*Coupon, error) + func (s *BillingService) StartTrial(ctx context.Context, actor security.Subject, planID, reference string) (*Subscription, error) + func (s *BillingService) Subscribe(ctx context.Context, actor security.Subject, in SubscribeRequest) (*CheckoutResult, error) + func (s *BillingService) SubscriptionsOf(ctx context.Context, g security.Grant) ([]*Subscription, error) + func (s *BillingService) SubscriptionsPage(ctx context.Context, actor security.Subject, q PageQuery, perPage int) (Page[*Subscription], error) + func (s *BillingService) SweepDue(ctx context.Context, now time.Time) (int, error) + func (s *BillingService) UpdateCoupon(ctx context.Context, actor security.Subject, id string, in CouponRequest) (*Coupon, error) + func (s *BillingService) UpdatePlan(ctx context.Context, actor security.Subject, id string, in PlanRequest) (*Plan, error) + func (s *BillingService) VoidInvoice(ctx context.Context, actor security.Subject, id string) (*Invoice, error) + type CellInput struct + Label string + Name string + Placeholder string + Required bool + Type string + Value string + type Checkout struct + Reference string + URL string + type CheckoutRequest struct + CouponCode string + Customer Customer + Description string + Discount int64 + InvoiceID string + MaxInstallments int + Meta Meta + Months int + PlanID string + PlanSlug string + ReturnURL string + Subtotal int64 + Tenant string + Total int64 + type CheckoutResult struct + Invoice *Invoice + URL string + type ChromeRequest struct + Admin bool + Page hview.Page + Subject security.Subject + Title string + type Config struct + Activity *activitylog.Logger + AdminMiddleware []func(http.Handler) http.Handler + AdminPrefix string + Chrome func(ctx *fhttp.Context, req ChromeRequest) (any, error) + Clock func() time.Time + Customer func(ctx context.Context, who security.Subject) (Customer, error) + DefaultProvider string + Listener Listener + Locale string + Location *time.Location + Middleware []func(http.Handler) http.Handler + NotificationPrefix string + PageSize int + Paths Paths + Prefix string + Providers []Provider + PublicURL string + TitleSeparator string + Translator *translation.Translator + func (c Config) Validate() error + type Coupon struct + Active Flag + Code string + CreatedAt time.Time + Description string + ID string + Kind CouponKind + MaxUses int + MinPurchase int64 + PlanID string + Renewals int + UpdatedAt time.Time + Uses int + ValidFrom *time.Time + ValidUntil *time.Time + Value int64 + func (row *Coupon) Fresh(ctx context.Context, g auth.Grant, with ...string) (*Coupon, error) + func (row *Coupon) Replicate(except ...string) (*Coupon, error) + type CouponCollection []*Coupon + func CouponCollectionOf(rows model.Rows) CouponCollection + func (c CouponCollection) Contains(key any) bool + func (c CouponCollection) Except(keys ...any) CouponCollection + func (c CouponCollection) Find(key any) *Coupon + func (c CouponCollection) FindOrFail(key any) (*Coupon, error) + func (c CouponCollection) Fresh(ctx context.Context, g auth.Grant, with ...string) (CouponCollection, error) + func (c CouponCollection) Load(ctx context.Context, g auth.Grant, relations ...string) error + func (c CouponCollection) LoadCount(ctx context.Context, g auth.Grant, relations ...string) error + func (c CouponCollection) LoadMissing(ctx context.Context, g auth.Grant, relations ...string) error + func (c CouponCollection) ModelKeys() []any + func (c CouponCollection) Only(keys ...any) CouponCollection + func (c CouponCollection) Pluck(column string) []any + func (c CouponCollection) Rows() model.Rows + func (c CouponCollection) ToArray() []map[string]any + func (c CouponCollection) Unique() CouponCollection + type CouponKind string + const CouponFixed + const CouponPercent + type CouponQuery struct + func Coupons(db model.DB) *CouponQuery + func (q *CouponQuery) AddSelect(columns ...any) *CouponQuery + func (q *CouponQuery) Avg(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *CouponQuery) Base() *model.Builder + func (q *CouponQuery) Chunk(ctx context.Context, g auth.Grant, count int, ...) error + func (q *CouponQuery) Clone() *CouponQuery + func (q *CouponQuery) Count(ctx context.Context, g auth.Grant, columns ...any) (int64, error) + func (q *CouponQuery) Create(ctx context.Context, g auth.Grant, attributes map[string]any) (*Coupon, error) + func (q *CouponQuery) Cursor(ctx context.Context, g auth.Grant) iter.Seq2[*Coupon, error] + func (q *CouponQuery) CursorPaginate(ctx context.Context, g auth.Grant, perPage int, cursor *pagination.Cursor, ...) (CouponCollection, *pagination.CursorPage, error) + func (q *CouponQuery) Decrement(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *CouponQuery) Delete(ctx context.Context, g auth.Grant) (int64, error) + func (q *CouponQuery) DoesntExist(ctx context.Context, g auth.Grant) (bool, error) + func (q *CouponQuery) DoesntHave(relation, boolean string, callback func(*query.Builder)) *CouponQuery + func (q *CouponQuery) Each(ctx context.Context, g auth.Grant, count int, ...) error + func (q *CouponQuery) Exists(ctx context.Context, g auth.Grant) (bool, error) + func (q *CouponQuery) Find(ctx context.Context, g auth.Grant, id any, columns ...any) (*Coupon, error) + func (q *CouponQuery) FindMany(ctx context.Context, g auth.Grant, ids []any, columns ...any) (CouponCollection, error) + func (q *CouponQuery) FindOrFail(ctx context.Context, g auth.Grant, id any, columns ...any) (*Coupon, error) + func (q *CouponQuery) FindOrNew(ctx context.Context, g auth.Grant, id any, columns ...any) (*Coupon, error) + func (q *CouponQuery) First(ctx context.Context, g auth.Grant, columns ...any) (*Coupon, error) + func (q *CouponQuery) FirstOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Coupon, error) + func (q *CouponQuery) FirstOrFail(ctx context.Context, g auth.Grant, columns ...any) (*Coupon, error) + func (q *CouponQuery) FirstOrNew(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Coupon, error) + func (q *CouponQuery) FirstWhere(ctx context.Context, g auth.Grant, column any, args ...any) (*Coupon, error) + func (q *CouponQuery) ForPage(page, perPage int) *CouponQuery + func (q *CouponQuery) ForceCreate(ctx context.Context, g auth.Grant, attributes map[string]any) (*Coupon, error) + func (q *CouponQuery) Get(ctx context.Context, g auth.Grant, columns ...any) (CouponCollection, error) + func (q *CouponQuery) GroupBy(groups ...any) *CouponQuery + func (q *CouponQuery) Has(relation, operator string, count int, boolean string, ...) *CouponQuery + func (q *CouponQuery) Increment(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *CouponQuery) Insert(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *CouponQuery) InsertOrIgnore(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *CouponQuery) Join(table any, first any, args ...any) *CouponQuery + func (q *CouponQuery) Latest(column ...string) *CouponQuery + func (q *CouponQuery) Limit(value int) *CouponQuery + func (q *CouponQuery) Max(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *CouponQuery) Min(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *CouponQuery) New() (*Coupon, error) + func (q *CouponQuery) Offset(value int) *CouponQuery + func (q *CouponQuery) Oldest(column ...string) *CouponQuery + func (q *CouponQuery) OrDoesntHave(relation string) *CouponQuery + func (q *CouponQuery) OrHas(relation, operator string, count int) *CouponQuery + func (q *CouponQuery) OrWhere(column any, args ...any) *CouponQuery + func (q *CouponQuery) OrWhereDoesntHave(relation string, callback func(*query.Builder)) *CouponQuery + func (q *CouponQuery) OrWhereHas(relation string, callback func(*query.Builder)) *CouponQuery + func (q *CouponQuery) OrWhereNot(column any, args ...any) *CouponQuery + func (q *CouponQuery) OrWhereRelation(relation string, column any, args ...any) *CouponQuery + func (q *CouponQuery) OrderBy(column any, direction ...string) *CouponQuery + func (q *CouponQuery) OrderByDesc(column any) *CouponQuery + func (q *CouponQuery) Paginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (CouponCollection, *pagination.LengthAwarePage, error) + func (q *CouponQuery) Pluck(ctx context.Context, g auth.Grant, column string) ([]any, error) + func (q *CouponQuery) Select(columns ...any) *CouponQuery + func (q *CouponQuery) SelectRaw(expression string, bindings ...any) *CouponQuery + func (q *CouponQuery) SimplePaginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (CouponCollection, *pagination.Page, error) + func (q *CouponQuery) Sole(ctx context.Context, g auth.Grant, columns ...any) (*Coupon, error) + func (q *CouponQuery) SoleValue(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *CouponQuery) Sum(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *CouponQuery) Touch(ctx context.Context, g auth.Grant, column ...string) (int64, error) + func (q *CouponQuery) Update(ctx context.Context, g auth.Grant, values map[string]any) (int64, error) + func (q *CouponQuery) UpdateOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Coupon, error) + func (q *CouponQuery) Upsert(ctx context.Context, g auth.Grant, values []map[string]any, ...) (int64, error) + func (q *CouponQuery) Value(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *CouponQuery) ValueOrFail(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *CouponQuery) Where(column any, args ...any) *CouponQuery + func (q *CouponQuery) WhereBelongsTo(relationshipName string, related ...model.Entity) *CouponQuery + func (q *CouponQuery) WhereBetween(column any, from, to any) *CouponQuery + func (q *CouponQuery) WhereColumn(first any, args ...any) *CouponQuery + func (q *CouponQuery) WhereDoesntHave(relation string, callback func(*query.Builder)) *CouponQuery + func (q *CouponQuery) WhereExists(callback func(*query.Builder)) *CouponQuery + func (q *CouponQuery) WhereHas(relation string, callback func(*query.Builder)) *CouponQuery + func (q *CouponQuery) WhereHasCount(relation string, callback func(*query.Builder), operator string, count int) *CouponQuery + func (q *CouponQuery) WhereIn(column any, values []any) *CouponQuery + func (q *CouponQuery) WhereKey(id any) *CouponQuery + func (q *CouponQuery) WhereNot(column any, args ...any) *CouponQuery + func (q *CouponQuery) WhereNotExists(callback func(*query.Builder)) *CouponQuery + func (q *CouponQuery) WhereNotIn(column any, values []any) *CouponQuery + func (q *CouponQuery) WhereNotNull(columns ...any) *CouponQuery + func (q *CouponQuery) WhereNull(columns ...any) *CouponQuery + func (q *CouponQuery) WhereRelation(relation string, column any, args ...any) *CouponQuery + func (q *CouponQuery) With(relations ...string) *CouponQuery + func (q *CouponQuery) WithAvg(relation, column string) *CouponQuery + func (q *CouponQuery) WithCount(relations ...string) *CouponQuery + func (q *CouponQuery) WithExists(relation string) *CouponQuery + func (q *CouponQuery) WithMax(relation, column string) *CouponQuery + func (q *CouponQuery) WithMin(relation, column string) *CouponQuery + func (q *CouponQuery) WithSum(relation, column string) *CouponQuery + func (q *CouponQuery) Without(relations ...string) *CouponQuery + func (q *CouponQuery) WithoutGlobalScope(identifier string) *CouponQuery + func (q *CouponQuery) WithoutGlobalScopes(identifiers ...string) *CouponQuery + type CouponRequest struct + Active bool + Code string + Description string + Kind CouponKind + MaxUses int + MinPurchase int64 + PlanID string + Renewals int + ValidFrom *time.Time + ValidUntil *time.Time + Value int64 + func (r CouponRequest) Validate() validation.Errors + type CouponResource struct + Active bool + Code string + Description string + ID string + Kind CouponKind + MaxUses int + MinPurchase int64 + PlanID string + Renewals int + Uses int + ValidFrom *time.Time + ValidUntil *time.Time + Value int64 + func NewCouponResource(c Coupon) CouponResource + func (CouponResource) With() map[string]any + func (r CouponResource) ToArray() map[string]any + type CouponRow struct + Active bool + Code string + Description string + Discount string + ID string + Minimum string + Plan string + Renewals string + Status string + ToggleURL string + Uses string + Validity string + type CouponUsage struct + CouponID string + CreatedAt time.Time + Discount int64 + ID string + InvoiceID string + PaymentID string + RenewalNumber int + TenantID string + UpdatedAt time.Time + UsedAt time.Time + func (row *CouponUsage) Fresh(ctx context.Context, g auth.Grant, with ...string) (*CouponUsage, error) + func (row *CouponUsage) Replicate(except ...string) (*CouponUsage, error) + type CouponUsageCollection []*CouponUsage + func CouponUsageCollectionOf(rows model.Rows) CouponUsageCollection + func (c CouponUsageCollection) Contains(key any) bool + func (c CouponUsageCollection) Except(keys ...any) CouponUsageCollection + func (c CouponUsageCollection) Find(key any) *CouponUsage + func (c CouponUsageCollection) FindOrFail(key any) (*CouponUsage, error) + func (c CouponUsageCollection) Fresh(ctx context.Context, g auth.Grant, with ...string) (CouponUsageCollection, error) + func (c CouponUsageCollection) Load(ctx context.Context, g auth.Grant, relations ...string) error + func (c CouponUsageCollection) LoadCount(ctx context.Context, g auth.Grant, relations ...string) error + func (c CouponUsageCollection) LoadMissing(ctx context.Context, g auth.Grant, relations ...string) error + func (c CouponUsageCollection) ModelKeys() []any + func (c CouponUsageCollection) Only(keys ...any) CouponUsageCollection + func (c CouponUsageCollection) Pluck(column string) []any + func (c CouponUsageCollection) Rows() model.Rows + func (c CouponUsageCollection) ToArray() []map[string]any + func (c CouponUsageCollection) Unique() CouponUsageCollection + type CouponUsageQuery struct + func CouponUsages(db model.DB) *CouponUsageQuery + func (q *CouponUsageQuery) AddSelect(columns ...any) *CouponUsageQuery + func (q *CouponUsageQuery) Avg(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *CouponUsageQuery) Base() *model.Builder + func (q *CouponUsageQuery) Chunk(ctx context.Context, g auth.Grant, count int, ...) error + func (q *CouponUsageQuery) Clone() *CouponUsageQuery + func (q *CouponUsageQuery) Count(ctx context.Context, g auth.Grant, columns ...any) (int64, error) + func (q *CouponUsageQuery) Create(ctx context.Context, g auth.Grant, attributes map[string]any) (*CouponUsage, error) + func (q *CouponUsageQuery) Cursor(ctx context.Context, g auth.Grant) iter.Seq2[*CouponUsage, error] + func (q *CouponUsageQuery) CursorPaginate(ctx context.Context, g auth.Grant, perPage int, cursor *pagination.Cursor, ...) (CouponUsageCollection, *pagination.CursorPage, error) + func (q *CouponUsageQuery) Decrement(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *CouponUsageQuery) Delete(ctx context.Context, g auth.Grant) (int64, error) + func (q *CouponUsageQuery) DoesntExist(ctx context.Context, g auth.Grant) (bool, error) + func (q *CouponUsageQuery) DoesntHave(relation, boolean string, callback func(*query.Builder)) *CouponUsageQuery + func (q *CouponUsageQuery) Each(ctx context.Context, g auth.Grant, count int, ...) error + func (q *CouponUsageQuery) Exists(ctx context.Context, g auth.Grant) (bool, error) + func (q *CouponUsageQuery) Find(ctx context.Context, g auth.Grant, id any, columns ...any) (*CouponUsage, error) + func (q *CouponUsageQuery) FindMany(ctx context.Context, g auth.Grant, ids []any, columns ...any) (CouponUsageCollection, error) + func (q *CouponUsageQuery) FindOrFail(ctx context.Context, g auth.Grant, id any, columns ...any) (*CouponUsage, error) + func (q *CouponUsageQuery) FindOrNew(ctx context.Context, g auth.Grant, id any, columns ...any) (*CouponUsage, error) + func (q *CouponUsageQuery) First(ctx context.Context, g auth.Grant, columns ...any) (*CouponUsage, error) + func (q *CouponUsageQuery) FirstOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*CouponUsage, error) + func (q *CouponUsageQuery) FirstOrFail(ctx context.Context, g auth.Grant, columns ...any) (*CouponUsage, error) + func (q *CouponUsageQuery) FirstOrNew(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*CouponUsage, error) + func (q *CouponUsageQuery) FirstWhere(ctx context.Context, g auth.Grant, column any, args ...any) (*CouponUsage, error) + func (q *CouponUsageQuery) ForPage(page, perPage int) *CouponUsageQuery + func (q *CouponUsageQuery) ForceCreate(ctx context.Context, g auth.Grant, attributes map[string]any) (*CouponUsage, error) + func (q *CouponUsageQuery) Get(ctx context.Context, g auth.Grant, columns ...any) (CouponUsageCollection, error) + func (q *CouponUsageQuery) GroupBy(groups ...any) *CouponUsageQuery + func (q *CouponUsageQuery) Has(relation, operator string, count int, boolean string, ...) *CouponUsageQuery + func (q *CouponUsageQuery) Increment(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *CouponUsageQuery) Insert(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *CouponUsageQuery) InsertOrIgnore(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *CouponUsageQuery) Join(table any, first any, args ...any) *CouponUsageQuery + func (q *CouponUsageQuery) Latest(column ...string) *CouponUsageQuery + func (q *CouponUsageQuery) Limit(value int) *CouponUsageQuery + func (q *CouponUsageQuery) Max(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *CouponUsageQuery) Min(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *CouponUsageQuery) New() (*CouponUsage, error) + func (q *CouponUsageQuery) Offset(value int) *CouponUsageQuery + func (q *CouponUsageQuery) Oldest(column ...string) *CouponUsageQuery + func (q *CouponUsageQuery) OrDoesntHave(relation string) *CouponUsageQuery + func (q *CouponUsageQuery) OrHas(relation, operator string, count int) *CouponUsageQuery + func (q *CouponUsageQuery) OrWhere(column any, args ...any) *CouponUsageQuery + func (q *CouponUsageQuery) OrWhereDoesntHave(relation string, callback func(*query.Builder)) *CouponUsageQuery + func (q *CouponUsageQuery) OrWhereHas(relation string, callback func(*query.Builder)) *CouponUsageQuery + func (q *CouponUsageQuery) OrWhereNot(column any, args ...any) *CouponUsageQuery + func (q *CouponUsageQuery) OrWhereRelation(relation string, column any, args ...any) *CouponUsageQuery + func (q *CouponUsageQuery) OrderBy(column any, direction ...string) *CouponUsageQuery + func (q *CouponUsageQuery) OrderByDesc(column any) *CouponUsageQuery + func (q *CouponUsageQuery) Paginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (CouponUsageCollection, *pagination.LengthAwarePage, error) + func (q *CouponUsageQuery) Pluck(ctx context.Context, g auth.Grant, column string) ([]any, error) + func (q *CouponUsageQuery) Select(columns ...any) *CouponUsageQuery + func (q *CouponUsageQuery) SelectRaw(expression string, bindings ...any) *CouponUsageQuery + func (q *CouponUsageQuery) SimplePaginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (CouponUsageCollection, *pagination.Page, error) + func (q *CouponUsageQuery) Sole(ctx context.Context, g auth.Grant, columns ...any) (*CouponUsage, error) + func (q *CouponUsageQuery) SoleValue(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *CouponUsageQuery) Sum(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *CouponUsageQuery) Touch(ctx context.Context, g auth.Grant, column ...string) (int64, error) + func (q *CouponUsageQuery) Update(ctx context.Context, g auth.Grant, values map[string]any) (int64, error) + func (q *CouponUsageQuery) UpdateOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*CouponUsage, error) + func (q *CouponUsageQuery) Upsert(ctx context.Context, g auth.Grant, values []map[string]any, ...) (int64, error) + func (q *CouponUsageQuery) Value(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *CouponUsageQuery) ValueOrFail(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *CouponUsageQuery) Where(column any, args ...any) *CouponUsageQuery + func (q *CouponUsageQuery) WhereBelongsTo(relationshipName string, related ...model.Entity) *CouponUsageQuery + func (q *CouponUsageQuery) WhereBetween(column any, from, to any) *CouponUsageQuery + func (q *CouponUsageQuery) WhereColumn(first any, args ...any) *CouponUsageQuery + func (q *CouponUsageQuery) WhereDoesntHave(relation string, callback func(*query.Builder)) *CouponUsageQuery + func (q *CouponUsageQuery) WhereExists(callback func(*query.Builder)) *CouponUsageQuery + func (q *CouponUsageQuery) WhereHas(relation string, callback func(*query.Builder)) *CouponUsageQuery + func (q *CouponUsageQuery) WhereHasCount(relation string, callback func(*query.Builder), operator string, count int) *CouponUsageQuery + func (q *CouponUsageQuery) WhereIn(column any, values []any) *CouponUsageQuery + func (q *CouponUsageQuery) WhereKey(id any) *CouponUsageQuery + func (q *CouponUsageQuery) WhereNot(column any, args ...any) *CouponUsageQuery + func (q *CouponUsageQuery) WhereNotExists(callback func(*query.Builder)) *CouponUsageQuery + func (q *CouponUsageQuery) WhereNotIn(column any, values []any) *CouponUsageQuery + func (q *CouponUsageQuery) WhereNotNull(columns ...any) *CouponUsageQuery + func (q *CouponUsageQuery) WhereNull(columns ...any) *CouponUsageQuery + func (q *CouponUsageQuery) WhereRelation(relation string, column any, args ...any) *CouponUsageQuery + func (q *CouponUsageQuery) With(relations ...string) *CouponUsageQuery + func (q *CouponUsageQuery) WithAvg(relation, column string) *CouponUsageQuery + func (q *CouponUsageQuery) WithCount(relations ...string) *CouponUsageQuery + func (q *CouponUsageQuery) WithExists(relation string) *CouponUsageQuery + func (q *CouponUsageQuery) WithMax(relation, column string) *CouponUsageQuery + func (q *CouponUsageQuery) WithMin(relation, column string) *CouponUsageQuery + func (q *CouponUsageQuery) WithSum(relation, column string) *CouponUsageQuery + func (q *CouponUsageQuery) Without(relations ...string) *CouponUsageQuery + func (q *CouponUsageQuery) WithoutGlobalScope(identifier string) *CouponUsageQuery + func (q *CouponUsageQuery) WithoutGlobalScopes(identifiers ...string) *CouponUsageQuery + type Customer struct + Document string + Email string + Name string + Phone string + type Event struct + At time.Time + Grant security.Grant + Invoice *InvoiceResource + Name EventName + Plan PlanResource + Subscription SubscriptionResource + Tenant string + type EventName string + const EventActivated + const EventCanceled + const EventExpired + const EventInvoicePaid + const EventPastDue + const EventRenewed + const EventTrialStarted + type Flag bool + func (f *Flag) Scan(value any) error + func (f Flag) Value() (driver.Value, error) + type FormState struct + func (f FormState) ErrorSummary() []string + func (f FormState) FieldError(name string) string + func (f FormState) FieldErrors(name string) []string + func (f FormState) HasErrors() bool + func (f FormState) LogValue() slog.Value + func (f FormState) MarshalJSON() ([]byte, error) + type Invoice struct + CheckoutURL string + CouponCode string + CouponID string + CreatedAt time.Time + CreatedBy string + Discount int64 + ID string + Kind InvoiceKind + MaxInstallments int + Meta Meta + Months int + PaidAt *time.Time + PlanID string + PlanName string + Provider string + ProviderRef string + ProviderStatus string + Reference string + RenewalNumber int + Status InvoiceStatus + SubscriptionID string + Subtotal int64 + TenantID string + Total int64 + UpdatedAt time.Time + func (row *Invoice) Fresh(ctx context.Context, g auth.Grant, with ...string) (*Invoice, error) + func (row *Invoice) Replicate(except ...string) (*Invoice, error) + type InvoiceCollection []*Invoice + func InvoiceCollectionOf(rows model.Rows) InvoiceCollection + func (c InvoiceCollection) Contains(key any) bool + func (c InvoiceCollection) Except(keys ...any) InvoiceCollection + func (c InvoiceCollection) Find(key any) *Invoice + func (c InvoiceCollection) FindOrFail(key any) (*Invoice, error) + func (c InvoiceCollection) Fresh(ctx context.Context, g auth.Grant, with ...string) (InvoiceCollection, error) + func (c InvoiceCollection) Load(ctx context.Context, g auth.Grant, relations ...string) error + func (c InvoiceCollection) LoadCount(ctx context.Context, g auth.Grant, relations ...string) error + func (c InvoiceCollection) LoadMissing(ctx context.Context, g auth.Grant, relations ...string) error + func (c InvoiceCollection) ModelKeys() []any + func (c InvoiceCollection) Only(keys ...any) InvoiceCollection + func (c InvoiceCollection) Pluck(column string) []any + func (c InvoiceCollection) Rows() model.Rows + func (c InvoiceCollection) ToArray() []map[string]any + func (c InvoiceCollection) Unique() InvoiceCollection + type InvoiceKind string + const InvoiceNew + const InvoiceRenewal + type InvoicePageData struct + Instructions string + Invoice InvoiceRow + type InvoiceQuery struct + func Invoices(db model.DB) *InvoiceQuery + func (q *InvoiceQuery) AddSelect(columns ...any) *InvoiceQuery + func (q *InvoiceQuery) Avg(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *InvoiceQuery) Base() *model.Builder + func (q *InvoiceQuery) Chunk(ctx context.Context, g auth.Grant, count int, ...) error + func (q *InvoiceQuery) Clone() *InvoiceQuery + func (q *InvoiceQuery) Count(ctx context.Context, g auth.Grant, columns ...any) (int64, error) + func (q *InvoiceQuery) Create(ctx context.Context, g auth.Grant, attributes map[string]any) (*Invoice, error) + func (q *InvoiceQuery) Cursor(ctx context.Context, g auth.Grant) iter.Seq2[*Invoice, error] + func (q *InvoiceQuery) CursorPaginate(ctx context.Context, g auth.Grant, perPage int, cursor *pagination.Cursor, ...) (InvoiceCollection, *pagination.CursorPage, error) + func (q *InvoiceQuery) Decrement(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *InvoiceQuery) Delete(ctx context.Context, g auth.Grant) (int64, error) + func (q *InvoiceQuery) DoesntExist(ctx context.Context, g auth.Grant) (bool, error) + func (q *InvoiceQuery) DoesntHave(relation, boolean string, callback func(*query.Builder)) *InvoiceQuery + func (q *InvoiceQuery) Each(ctx context.Context, g auth.Grant, count int, ...) error + func (q *InvoiceQuery) Exists(ctx context.Context, g auth.Grant) (bool, error) + func (q *InvoiceQuery) Find(ctx context.Context, g auth.Grant, id any, columns ...any) (*Invoice, error) + func (q *InvoiceQuery) FindMany(ctx context.Context, g auth.Grant, ids []any, columns ...any) (InvoiceCollection, error) + func (q *InvoiceQuery) FindOrFail(ctx context.Context, g auth.Grant, id any, columns ...any) (*Invoice, error) + func (q *InvoiceQuery) FindOrNew(ctx context.Context, g auth.Grant, id any, columns ...any) (*Invoice, error) + func (q *InvoiceQuery) First(ctx context.Context, g auth.Grant, columns ...any) (*Invoice, error) + func (q *InvoiceQuery) FirstOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Invoice, error) + func (q *InvoiceQuery) FirstOrFail(ctx context.Context, g auth.Grant, columns ...any) (*Invoice, error) + func (q *InvoiceQuery) FirstOrNew(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Invoice, error) + func (q *InvoiceQuery) FirstWhere(ctx context.Context, g auth.Grant, column any, args ...any) (*Invoice, error) + func (q *InvoiceQuery) ForPage(page, perPage int) *InvoiceQuery + func (q *InvoiceQuery) ForceCreate(ctx context.Context, g auth.Grant, attributes map[string]any) (*Invoice, error) + func (q *InvoiceQuery) Get(ctx context.Context, g auth.Grant, columns ...any) (InvoiceCollection, error) + func (q *InvoiceQuery) GroupBy(groups ...any) *InvoiceQuery + func (q *InvoiceQuery) Has(relation, operator string, count int, boolean string, ...) *InvoiceQuery + func (q *InvoiceQuery) Increment(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *InvoiceQuery) Insert(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *InvoiceQuery) InsertOrIgnore(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *InvoiceQuery) Join(table any, first any, args ...any) *InvoiceQuery + func (q *InvoiceQuery) Latest(column ...string) *InvoiceQuery + func (q *InvoiceQuery) Limit(value int) *InvoiceQuery + func (q *InvoiceQuery) Max(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *InvoiceQuery) Min(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *InvoiceQuery) New() (*Invoice, error) + func (q *InvoiceQuery) Offset(value int) *InvoiceQuery + func (q *InvoiceQuery) Oldest(column ...string) *InvoiceQuery + func (q *InvoiceQuery) OrDoesntHave(relation string) *InvoiceQuery + func (q *InvoiceQuery) OrHas(relation, operator string, count int) *InvoiceQuery + func (q *InvoiceQuery) OrWhere(column any, args ...any) *InvoiceQuery + func (q *InvoiceQuery) OrWhereDoesntHave(relation string, callback func(*query.Builder)) *InvoiceQuery + func (q *InvoiceQuery) OrWhereHas(relation string, callback func(*query.Builder)) *InvoiceQuery + func (q *InvoiceQuery) OrWhereNot(column any, args ...any) *InvoiceQuery + func (q *InvoiceQuery) OrWhereRelation(relation string, column any, args ...any) *InvoiceQuery + func (q *InvoiceQuery) OrderBy(column any, direction ...string) *InvoiceQuery + func (q *InvoiceQuery) OrderByDesc(column any) *InvoiceQuery + func (q *InvoiceQuery) Paginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (InvoiceCollection, *pagination.LengthAwarePage, error) + func (q *InvoiceQuery) Pluck(ctx context.Context, g auth.Grant, column string) ([]any, error) + func (q *InvoiceQuery) Select(columns ...any) *InvoiceQuery + func (q *InvoiceQuery) SelectRaw(expression string, bindings ...any) *InvoiceQuery + func (q *InvoiceQuery) SimplePaginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (InvoiceCollection, *pagination.Page, error) + func (q *InvoiceQuery) Sole(ctx context.Context, g auth.Grant, columns ...any) (*Invoice, error) + func (q *InvoiceQuery) SoleValue(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *InvoiceQuery) Sum(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *InvoiceQuery) Touch(ctx context.Context, g auth.Grant, column ...string) (int64, error) + func (q *InvoiceQuery) Update(ctx context.Context, g auth.Grant, values map[string]any) (int64, error) + func (q *InvoiceQuery) UpdateOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Invoice, error) + func (q *InvoiceQuery) Upsert(ctx context.Context, g auth.Grant, values []map[string]any, ...) (int64, error) + func (q *InvoiceQuery) Value(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *InvoiceQuery) ValueOrFail(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *InvoiceQuery) Where(column any, args ...any) *InvoiceQuery + func (q *InvoiceQuery) WhereBelongsTo(relationshipName string, related ...model.Entity) *InvoiceQuery + func (q *InvoiceQuery) WhereBetween(column any, from, to any) *InvoiceQuery + func (q *InvoiceQuery) WhereColumn(first any, args ...any) *InvoiceQuery + func (q *InvoiceQuery) WhereDoesntHave(relation string, callback func(*query.Builder)) *InvoiceQuery + func (q *InvoiceQuery) WhereExists(callback func(*query.Builder)) *InvoiceQuery + func (q *InvoiceQuery) WhereHas(relation string, callback func(*query.Builder)) *InvoiceQuery + func (q *InvoiceQuery) WhereHasCount(relation string, callback func(*query.Builder), operator string, count int) *InvoiceQuery + func (q *InvoiceQuery) WhereIn(column any, values []any) *InvoiceQuery + func (q *InvoiceQuery) WhereKey(id any) *InvoiceQuery + func (q *InvoiceQuery) WhereNot(column any, args ...any) *InvoiceQuery + func (q *InvoiceQuery) WhereNotExists(callback func(*query.Builder)) *InvoiceQuery + func (q *InvoiceQuery) WhereNotIn(column any, values []any) *InvoiceQuery + func (q *InvoiceQuery) WhereNotNull(columns ...any) *InvoiceQuery + func (q *InvoiceQuery) WhereNull(columns ...any) *InvoiceQuery + func (q *InvoiceQuery) WhereRelation(relation string, column any, args ...any) *InvoiceQuery + func (q *InvoiceQuery) With(relations ...string) *InvoiceQuery + func (q *InvoiceQuery) WithAvg(relation, column string) *InvoiceQuery + func (q *InvoiceQuery) WithCount(relations ...string) *InvoiceQuery + func (q *InvoiceQuery) WithExists(relation string) *InvoiceQuery + func (q *InvoiceQuery) WithMax(relation, column string) *InvoiceQuery + func (q *InvoiceQuery) WithMin(relation, column string) *InvoiceQuery + func (q *InvoiceQuery) WithSum(relation, column string) *InvoiceQuery + func (q *InvoiceQuery) Without(relations ...string) *InvoiceQuery + func (q *InvoiceQuery) WithoutGlobalScope(identifier string) *InvoiceQuery + func (q *InvoiceQuery) WithoutGlobalScopes(identifiers ...string) *InvoiceQuery + type InvoiceResource struct + CheckoutURL string + CouponCode string + CreatedAt time.Time + Discount int64 + ID string + Kind InvoiceKind + MaxInstallments int + Meta map[string]string + Months int + PaidAt *time.Time + PlanID string + PlanName string + Provider string + ProviderRef string + Reference string + RenewalNumber int + Status InvoiceStatus + SubscriptionID string + Subtotal int64 + TenantID string + Total int64 + func NewInvoiceResource(i Invoice) InvoiceResource + func (InvoiceResource) With() map[string]any + func (r InvoiceResource) ToArray() map[string]any + type InvoiceRow struct + ConfirmURL string + Coupon string + Created string + Discount string + ID string + Installments string + Open bool + Paid string + PayURL string + Period string + Plan string + Provider string + ProviderStatus string + Status string + StatusKey string + Subtotal string + Tenant string + Total string + URL string + VoidURL string + type InvoiceStatus string + const InvoiceCanceled + const InvoiceFailed + const InvoiceOpen + const InvoicePaid + type InvoicesPageData struct + Rows []InvoiceRow + Table TableState + type Labels struct + Locale string + func (l Labels) Errors(errs validation.Errors) validation.Errors + func (l Labels) Field(name string) string + func (l Labels) InvoiceStatus(s InvoiceStatus) string + func (l Labels) Message(msg string) string + func (l Labels) Months(n int) string + func (l Labels) SubscriptionStatus(s SubscriptionStatus) string + func (l Labels) Summary(errs validation.Errors) []string + func (l Labels) T(key string) string + type Listener func(ctx context.Context, e Event) error + type ManualPayment struct + Method string + PaidAt time.Time + Reference string + type ManualProvider struct + Instructions string + func (ManualProvider) CreateCheckout(context.Context, CheckoutRequest) (Checkout, error) + func (ManualProvider) Name() string + func (ManualProvider) ParseNotification(*http.Request) (Notification, error) + func (ManualProvider) QueryStatus(context.Context, StatusQuery) (PaymentStatus, error) + func (p ManualProvider) PaymentInstructions() string + type Meta map[string]string + func (m *Meta) Scan(value any) error + func (m Meta) Value() (driver.Value, error) + type Module struct + func New(cfg Config, db *data.DB, sessions *security.SessionStore) (*Module, error) + func (m *Module) AccountRoutes(r *fhttp.Router) + func (m *Module) AdminRoutes(r *fhttp.Router) + func (m *Module) Boot(context.Context) error + func (m *Module) CSRFExemptPaths() []string + func (m *Module) Labels(locale string) Labels + func (m *Module) Migrations() []foundation.Migration + func (m *Module) Name() string + func (m *Module) NotificationRoutes(r *fhttp.Router) + func (m *Module) Publishes() []foundation.Publication + func (m *Module) Routes(r *fhttp.Router) + func (m *Module) Schedule() []foundation.Task + func (m *Module) Service() *BillingService + func (m *Module) URLs() URLs + type Notification struct + Fields map[string]string + InvoiceID string + Reference string + type Page struct + Page int + Pages int + PerPage int + Rows []T + Total int + type PageQuery struct + Dir string + Page int + PerPage int + Search string + Sort string + Status string + type Paths struct + Admin string + Cancellation string + Checkout string + Coupons string + Invoices string + Payment string + Plans string + Renewal string + Return string + Subscriptions string + Trial string + type Payment struct + Amount int64 + ConfirmedBy string + CreatedAt time.Time + ID string + Installments int + InvoiceID string + Method string + PaidAt time.Time + Provider string + ProviderRef string + TenantID string + UpdatedAt time.Time + func (row *Payment) Fresh(ctx context.Context, g auth.Grant, with ...string) (*Payment, error) + func (row *Payment) Replicate(except ...string) (*Payment, error) + type PaymentCollection []*Payment + func PaymentCollectionOf(rows model.Rows) PaymentCollection + func (c PaymentCollection) Contains(key any) bool + func (c PaymentCollection) Except(keys ...any) PaymentCollection + func (c PaymentCollection) Find(key any) *Payment + func (c PaymentCollection) FindOrFail(key any) (*Payment, error) + func (c PaymentCollection) Fresh(ctx context.Context, g auth.Grant, with ...string) (PaymentCollection, error) + func (c PaymentCollection) Load(ctx context.Context, g auth.Grant, relations ...string) error + func (c PaymentCollection) LoadCount(ctx context.Context, g auth.Grant, relations ...string) error + func (c PaymentCollection) LoadMissing(ctx context.Context, g auth.Grant, relations ...string) error + func (c PaymentCollection) ModelKeys() []any + func (c PaymentCollection) Only(keys ...any) PaymentCollection + func (c PaymentCollection) Pluck(column string) []any + func (c PaymentCollection) Rows() model.Rows + func (c PaymentCollection) ToArray() []map[string]any + func (c PaymentCollection) Unique() PaymentCollection + type PaymentQuery struct + func Payments(db model.DB) *PaymentQuery + func (q *PaymentQuery) AddSelect(columns ...any) *PaymentQuery + func (q *PaymentQuery) Avg(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *PaymentQuery) Base() *model.Builder + func (q *PaymentQuery) Chunk(ctx context.Context, g auth.Grant, count int, ...) error + func (q *PaymentQuery) Clone() *PaymentQuery + func (q *PaymentQuery) Count(ctx context.Context, g auth.Grant, columns ...any) (int64, error) + func (q *PaymentQuery) Create(ctx context.Context, g auth.Grant, attributes map[string]any) (*Payment, error) + func (q *PaymentQuery) Cursor(ctx context.Context, g auth.Grant) iter.Seq2[*Payment, error] + func (q *PaymentQuery) CursorPaginate(ctx context.Context, g auth.Grant, perPage int, cursor *pagination.Cursor, ...) (PaymentCollection, *pagination.CursorPage, error) + func (q *PaymentQuery) Decrement(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *PaymentQuery) Delete(ctx context.Context, g auth.Grant) (int64, error) + func (q *PaymentQuery) DoesntExist(ctx context.Context, g auth.Grant) (bool, error) + func (q *PaymentQuery) DoesntHave(relation, boolean string, callback func(*query.Builder)) *PaymentQuery + func (q *PaymentQuery) Each(ctx context.Context, g auth.Grant, count int, ...) error + func (q *PaymentQuery) Exists(ctx context.Context, g auth.Grant) (bool, error) + func (q *PaymentQuery) Find(ctx context.Context, g auth.Grant, id any, columns ...any) (*Payment, error) + func (q *PaymentQuery) FindMany(ctx context.Context, g auth.Grant, ids []any, columns ...any) (PaymentCollection, error) + func (q *PaymentQuery) FindOrFail(ctx context.Context, g auth.Grant, id any, columns ...any) (*Payment, error) + func (q *PaymentQuery) FindOrNew(ctx context.Context, g auth.Grant, id any, columns ...any) (*Payment, error) + func (q *PaymentQuery) First(ctx context.Context, g auth.Grant, columns ...any) (*Payment, error) + func (q *PaymentQuery) FirstOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Payment, error) + func (q *PaymentQuery) FirstOrFail(ctx context.Context, g auth.Grant, columns ...any) (*Payment, error) + func (q *PaymentQuery) FirstOrNew(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Payment, error) + func (q *PaymentQuery) FirstWhere(ctx context.Context, g auth.Grant, column any, args ...any) (*Payment, error) + func (q *PaymentQuery) ForPage(page, perPage int) *PaymentQuery + func (q *PaymentQuery) ForceCreate(ctx context.Context, g auth.Grant, attributes map[string]any) (*Payment, error) + func (q *PaymentQuery) Get(ctx context.Context, g auth.Grant, columns ...any) (PaymentCollection, error) + func (q *PaymentQuery) GroupBy(groups ...any) *PaymentQuery + func (q *PaymentQuery) Has(relation, operator string, count int, boolean string, ...) *PaymentQuery + func (q *PaymentQuery) Increment(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *PaymentQuery) Insert(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *PaymentQuery) InsertOrIgnore(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *PaymentQuery) Join(table any, first any, args ...any) *PaymentQuery + func (q *PaymentQuery) Latest(column ...string) *PaymentQuery + func (q *PaymentQuery) Limit(value int) *PaymentQuery + func (q *PaymentQuery) Max(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *PaymentQuery) Min(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *PaymentQuery) New() (*Payment, error) + func (q *PaymentQuery) Offset(value int) *PaymentQuery + func (q *PaymentQuery) Oldest(column ...string) *PaymentQuery + func (q *PaymentQuery) OrDoesntHave(relation string) *PaymentQuery + func (q *PaymentQuery) OrHas(relation, operator string, count int) *PaymentQuery + func (q *PaymentQuery) OrWhere(column any, args ...any) *PaymentQuery + func (q *PaymentQuery) OrWhereDoesntHave(relation string, callback func(*query.Builder)) *PaymentQuery + func (q *PaymentQuery) OrWhereHas(relation string, callback func(*query.Builder)) *PaymentQuery + func (q *PaymentQuery) OrWhereNot(column any, args ...any) *PaymentQuery + func (q *PaymentQuery) OrWhereRelation(relation string, column any, args ...any) *PaymentQuery + func (q *PaymentQuery) OrderBy(column any, direction ...string) *PaymentQuery + func (q *PaymentQuery) OrderByDesc(column any) *PaymentQuery + func (q *PaymentQuery) Paginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (PaymentCollection, *pagination.LengthAwarePage, error) + func (q *PaymentQuery) Pluck(ctx context.Context, g auth.Grant, column string) ([]any, error) + func (q *PaymentQuery) Select(columns ...any) *PaymentQuery + func (q *PaymentQuery) SelectRaw(expression string, bindings ...any) *PaymentQuery + func (q *PaymentQuery) SimplePaginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (PaymentCollection, *pagination.Page, error) + func (q *PaymentQuery) Sole(ctx context.Context, g auth.Grant, columns ...any) (*Payment, error) + func (q *PaymentQuery) SoleValue(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *PaymentQuery) Sum(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *PaymentQuery) Touch(ctx context.Context, g auth.Grant, column ...string) (int64, error) + func (q *PaymentQuery) Update(ctx context.Context, g auth.Grant, values map[string]any) (int64, error) + func (q *PaymentQuery) UpdateOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Payment, error) + func (q *PaymentQuery) Upsert(ctx context.Context, g auth.Grant, values []map[string]any, ...) (int64, error) + func (q *PaymentQuery) Value(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *PaymentQuery) ValueOrFail(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *PaymentQuery) Where(column any, args ...any) *PaymentQuery + func (q *PaymentQuery) WhereBelongsTo(relationshipName string, related ...model.Entity) *PaymentQuery + func (q *PaymentQuery) WhereBetween(column any, from, to any) *PaymentQuery + func (q *PaymentQuery) WhereColumn(first any, args ...any) *PaymentQuery + func (q *PaymentQuery) WhereDoesntHave(relation string, callback func(*query.Builder)) *PaymentQuery + func (q *PaymentQuery) WhereExists(callback func(*query.Builder)) *PaymentQuery + func (q *PaymentQuery) WhereHas(relation string, callback func(*query.Builder)) *PaymentQuery + func (q *PaymentQuery) WhereHasCount(relation string, callback func(*query.Builder), operator string, count int) *PaymentQuery + func (q *PaymentQuery) WhereIn(column any, values []any) *PaymentQuery + func (q *PaymentQuery) WhereKey(id any) *PaymentQuery + func (q *PaymentQuery) WhereNot(column any, args ...any) *PaymentQuery + func (q *PaymentQuery) WhereNotExists(callback func(*query.Builder)) *PaymentQuery + func (q *PaymentQuery) WhereNotIn(column any, values []any) *PaymentQuery + func (q *PaymentQuery) WhereNotNull(columns ...any) *PaymentQuery + func (q *PaymentQuery) WhereNull(columns ...any) *PaymentQuery + func (q *PaymentQuery) WhereRelation(relation string, column any, args ...any) *PaymentQuery + func (q *PaymentQuery) With(relations ...string) *PaymentQuery + func (q *PaymentQuery) WithAvg(relation, column string) *PaymentQuery + func (q *PaymentQuery) WithCount(relations ...string) *PaymentQuery + func (q *PaymentQuery) WithExists(relation string) *PaymentQuery + func (q *PaymentQuery) WithMax(relation, column string) *PaymentQuery + func (q *PaymentQuery) WithMin(relation, column string) *PaymentQuery + func (q *PaymentQuery) WithSum(relation, column string) *PaymentQuery + func (q *PaymentQuery) Without(relations ...string) *PaymentQuery + func (q *PaymentQuery) WithoutGlobalScope(identifier string) *PaymentQuery + func (q *PaymentQuery) WithoutGlobalScopes(identifiers ...string) *PaymentQuery + type PaymentState string + const StateFailed + const StatePaid + const StatePending + const StateRefunded + type PaymentStatus struct + Amount int64 + Installments int + Method string + PaidAt time.Time + Raw string + Reference string + State PaymentState + type Period struct + End time.Time + Start time.Time + func NextPeriod(s *Subscription, paidAt time.Time, months int) Period + type Plan struct + Active Flag + CreatedAt time.Time + Description string + Features StringList + GraceDays int + ID string + InstallmentsCap int + InstallmentsFrom int + IntervalMonths int + Meta Meta + Name string + Position int + Price int64 + Slug string + TrialDays int + UpdatedAt time.Time + func (p Plan) Installments() int + func (row *Plan) Fresh(ctx context.Context, g auth.Grant, with ...string) (*Plan, error) + func (row *Plan) Replicate(except ...string) (*Plan, error) + type PlanCard struct + CheckoutURL string + Description string + Features []string + ID string + Installments string + Name string + Period string + Price string + TrialDays int + TrialURL string + type PlanCollection []*Plan + func PlanCollectionOf(rows model.Rows) PlanCollection + func (c PlanCollection) Contains(key any) bool + func (c PlanCollection) Except(keys ...any) PlanCollection + func (c PlanCollection) Find(key any) *Plan + func (c PlanCollection) FindOrFail(key any) (*Plan, error) + func (c PlanCollection) Fresh(ctx context.Context, g auth.Grant, with ...string) (PlanCollection, error) + func (c PlanCollection) Load(ctx context.Context, g auth.Grant, relations ...string) error + func (c PlanCollection) LoadCount(ctx context.Context, g auth.Grant, relations ...string) error + func (c PlanCollection) LoadMissing(ctx context.Context, g auth.Grant, relations ...string) error + func (c PlanCollection) ModelKeys() []any + func (c PlanCollection) Only(keys ...any) PlanCollection + func (c PlanCollection) Pluck(column string) []any + func (c PlanCollection) Rows() model.Rows + func (c PlanCollection) ToArray() []map[string]any + func (c PlanCollection) Unique() PlanCollection + type PlanForm struct + Active bool + Description string + Features string + GraceDays string + InstallmentsCap string + InstallmentsFrom string + IntervalMonths string + Meta string + Name string + Position string + Price string + Slug string + TrialDays string + type PlanQuery struct + func Plans(db model.DB) *PlanQuery + func (q *PlanQuery) AddSelect(columns ...any) *PlanQuery + func (q *PlanQuery) Avg(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *PlanQuery) Base() *model.Builder + func (q *PlanQuery) Chunk(ctx context.Context, g auth.Grant, count int, ...) error + func (q *PlanQuery) Clone() *PlanQuery + func (q *PlanQuery) Count(ctx context.Context, g auth.Grant, columns ...any) (int64, error) + func (q *PlanQuery) Create(ctx context.Context, g auth.Grant, attributes map[string]any) (*Plan, error) + func (q *PlanQuery) Cursor(ctx context.Context, g auth.Grant) iter.Seq2[*Plan, error] + func (q *PlanQuery) CursorPaginate(ctx context.Context, g auth.Grant, perPage int, cursor *pagination.Cursor, ...) (PlanCollection, *pagination.CursorPage, error) + func (q *PlanQuery) Decrement(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *PlanQuery) Delete(ctx context.Context, g auth.Grant) (int64, error) + func (q *PlanQuery) DoesntExist(ctx context.Context, g auth.Grant) (bool, error) + func (q *PlanQuery) DoesntHave(relation, boolean string, callback func(*query.Builder)) *PlanQuery + func (q *PlanQuery) Each(ctx context.Context, g auth.Grant, count int, ...) error + func (q *PlanQuery) Exists(ctx context.Context, g auth.Grant) (bool, error) + func (q *PlanQuery) Find(ctx context.Context, g auth.Grant, id any, columns ...any) (*Plan, error) + func (q *PlanQuery) FindMany(ctx context.Context, g auth.Grant, ids []any, columns ...any) (PlanCollection, error) + func (q *PlanQuery) FindOrFail(ctx context.Context, g auth.Grant, id any, columns ...any) (*Plan, error) + func (q *PlanQuery) FindOrNew(ctx context.Context, g auth.Grant, id any, columns ...any) (*Plan, error) + func (q *PlanQuery) First(ctx context.Context, g auth.Grant, columns ...any) (*Plan, error) + func (q *PlanQuery) FirstOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Plan, error) + func (q *PlanQuery) FirstOrFail(ctx context.Context, g auth.Grant, columns ...any) (*Plan, error) + func (q *PlanQuery) FirstOrNew(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Plan, error) + func (q *PlanQuery) FirstWhere(ctx context.Context, g auth.Grant, column any, args ...any) (*Plan, error) + func (q *PlanQuery) ForPage(page, perPage int) *PlanQuery + func (q *PlanQuery) ForceCreate(ctx context.Context, g auth.Grant, attributes map[string]any) (*Plan, error) + func (q *PlanQuery) Get(ctx context.Context, g auth.Grant, columns ...any) (PlanCollection, error) + func (q *PlanQuery) GroupBy(groups ...any) *PlanQuery + func (q *PlanQuery) Has(relation, operator string, count int, boolean string, ...) *PlanQuery + func (q *PlanQuery) Increment(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *PlanQuery) Insert(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *PlanQuery) InsertOrIgnore(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *PlanQuery) Join(table any, first any, args ...any) *PlanQuery + func (q *PlanQuery) Latest(column ...string) *PlanQuery + func (q *PlanQuery) Limit(value int) *PlanQuery + func (q *PlanQuery) Max(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *PlanQuery) Min(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *PlanQuery) New() (*Plan, error) + func (q *PlanQuery) Offset(value int) *PlanQuery + func (q *PlanQuery) Oldest(column ...string) *PlanQuery + func (q *PlanQuery) OrDoesntHave(relation string) *PlanQuery + func (q *PlanQuery) OrHas(relation, operator string, count int) *PlanQuery + func (q *PlanQuery) OrWhere(column any, args ...any) *PlanQuery + func (q *PlanQuery) OrWhereDoesntHave(relation string, callback func(*query.Builder)) *PlanQuery + func (q *PlanQuery) OrWhereHas(relation string, callback func(*query.Builder)) *PlanQuery + func (q *PlanQuery) OrWhereNot(column any, args ...any) *PlanQuery + func (q *PlanQuery) OrWhereRelation(relation string, column any, args ...any) *PlanQuery + func (q *PlanQuery) OrderBy(column any, direction ...string) *PlanQuery + func (q *PlanQuery) OrderByDesc(column any) *PlanQuery + func (q *PlanQuery) Paginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (PlanCollection, *pagination.LengthAwarePage, error) + func (q *PlanQuery) Pluck(ctx context.Context, g auth.Grant, column string) ([]any, error) + func (q *PlanQuery) Select(columns ...any) *PlanQuery + func (q *PlanQuery) SelectRaw(expression string, bindings ...any) *PlanQuery + func (q *PlanQuery) SimplePaginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (PlanCollection, *pagination.Page, error) + func (q *PlanQuery) Sole(ctx context.Context, g auth.Grant, columns ...any) (*Plan, error) + func (q *PlanQuery) SoleValue(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *PlanQuery) Sum(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *PlanQuery) Touch(ctx context.Context, g auth.Grant, column ...string) (int64, error) + func (q *PlanQuery) Update(ctx context.Context, g auth.Grant, values map[string]any) (int64, error) + func (q *PlanQuery) UpdateOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Plan, error) + func (q *PlanQuery) Upsert(ctx context.Context, g auth.Grant, values []map[string]any, ...) (int64, error) + func (q *PlanQuery) Value(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *PlanQuery) ValueOrFail(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *PlanQuery) Where(column any, args ...any) *PlanQuery + func (q *PlanQuery) WhereBelongsTo(relationshipName string, related ...model.Entity) *PlanQuery + func (q *PlanQuery) WhereBetween(column any, from, to any) *PlanQuery + func (q *PlanQuery) WhereColumn(first any, args ...any) *PlanQuery + func (q *PlanQuery) WhereDoesntHave(relation string, callback func(*query.Builder)) *PlanQuery + func (q *PlanQuery) WhereExists(callback func(*query.Builder)) *PlanQuery + func (q *PlanQuery) WhereHas(relation string, callback func(*query.Builder)) *PlanQuery + func (q *PlanQuery) WhereHasCount(relation string, callback func(*query.Builder), operator string, count int) *PlanQuery + func (q *PlanQuery) WhereIn(column any, values []any) *PlanQuery + func (q *PlanQuery) WhereKey(id any) *PlanQuery + func (q *PlanQuery) WhereNot(column any, args ...any) *PlanQuery + func (q *PlanQuery) WhereNotExists(callback func(*query.Builder)) *PlanQuery + func (q *PlanQuery) WhereNotIn(column any, values []any) *PlanQuery + func (q *PlanQuery) WhereNotNull(columns ...any) *PlanQuery + func (q *PlanQuery) WhereNull(columns ...any) *PlanQuery + func (q *PlanQuery) WhereRelation(relation string, column any, args ...any) *PlanQuery + func (q *PlanQuery) With(relations ...string) *PlanQuery + func (q *PlanQuery) WithAvg(relation, column string) *PlanQuery + func (q *PlanQuery) WithCount(relations ...string) *PlanQuery + func (q *PlanQuery) WithExists(relation string) *PlanQuery + func (q *PlanQuery) WithMax(relation, column string) *PlanQuery + func (q *PlanQuery) WithMin(relation, column string) *PlanQuery + func (q *PlanQuery) WithSum(relation, column string) *PlanQuery + func (q *PlanQuery) Without(relations ...string) *PlanQuery + func (q *PlanQuery) WithoutGlobalScope(identifier string) *PlanQuery + func (q *PlanQuery) WithoutGlobalScopes(identifiers ...string) *PlanQuery + type PlanRequest struct + Active bool + Description string + Features []string + GraceDays int + InstallmentsCap int + InstallmentsFrom int + IntervalMonths int + Meta Meta + Name string + Position int + Price int64 + Slug string + TrialDays int + func (r PlanRequest) Validate() validation.Errors + type PlanResource struct + Active bool + CreatedAt time.Time + Description string + Features []string + GraceDays int + ID string + InstallmentsCap int + InstallmentsFrom int + IntervalMonths int + MaxInstallments int + Meta map[string]string + Name string + Position int + Price int64 + Slug string + TrialDays int + UpdatedAt time.Time + func NewPlanResource(p Plan) PlanResource + func (PlanResource) With() map[string]any + func (r PlanResource) ToArray() map[string]any + type PlanRow struct + Active bool + ID string + Installments string + Name string + Period string + Price string + Slug string + Status string + Trial string + URL string + type PlansPageData struct + CanSubscribe bool + Plans []PlanCard + type Provider interface + CreateCheckout func(ctx context.Context, req CheckoutRequest) (Checkout, error) + Name func() string + ParseNotification func(r *http.Request) (Notification, error) + QueryStatus func(ctx context.Context, q StatusQuery) (PaymentStatus, error) + type Quote struct + CouponApplied bool + Discount int64 + MaxInstallments int + Subtotal int64 + Total int64 + func Price(p Plan, c *Coupon, renewal bool, at time.Time) (Quote, error) + type Screen struct + Labels Labels + URLs URLs + func (s Screen) AccountNav(current string) template.HTML + func (s Screen) ActiveOptions() []components.SelectOption + func (s Screen) AdminNav(current string) template.HTML + func (s Screen) All() []string + func (s Screen) CellForm(action, method, label, variant string, inputs ...CellInput) template.HTML + func (s Screen) Chrome() any + func (s Screen) CouponKindOptions() []components.SelectOption + func (s Screen) ErrorSummary() []string + func (s Screen) FieldErrors(name string) []string + func (s Screen) Form() FormState + func (s Screen) HasErrors() bool + func (s Screen) InvoiceStatusOptions() []components.SelectOption + func (s Screen) LogValue() slog.Value + func (s Screen) MarshalJSON() ([]byte, error) + func (s Screen) SearchLabel(table string) string + func (s Screen) StatusFilter(options []components.SelectOption, chosen string) []components.DataTableFilter + func (s Screen) SubscriptionStatusOptions() []components.SelectOption + func (s Screen) TableLines() components.DataTableLines + type StatusQuery struct + InvoiceID string + Notification *Notification + Reference string + Total int64 + type StringList []string + func (l *StringList) Scan(value any) error + func (l StringList) Value() (driver.Value, error) + type SubscribeRequest struct + CouponCode string + Meta Meta + PlanID string + Provider string + Reference string + func (r SubscribeRequest) Validate() validation.Errors + type Subscription struct + CancelAtPeriodEnd Flag + CanceledAt *time.Time + CouponID string + CouponRenewalsLeft int + CreatedAt time.Time + CreatedBy string + CurrentPeriodEnd time.Time + CurrentPeriodStart time.Time + EndedAt *time.Time + GraceDays int + ID string + Meta Meta + PlanID string + Reference string + Renewals int + Status SubscriptionStatus + TenantID string + TrialEndsAt *time.Time + UpdatedAt time.Time + func (row *Subscription) Fresh(ctx context.Context, g auth.Grant, with ...string) (*Subscription, error) + func (row *Subscription) Replicate(except ...string) (*Subscription, error) + func (s Subscription) Ended() bool + func (s Subscription) Serving() bool + type SubscriptionCollection []*Subscription + func SubscriptionCollectionOf(rows model.Rows) SubscriptionCollection + func (c SubscriptionCollection) Contains(key any) bool + func (c SubscriptionCollection) Except(keys ...any) SubscriptionCollection + func (c SubscriptionCollection) Find(key any) *Subscription + func (c SubscriptionCollection) FindOrFail(key any) (*Subscription, error) + func (c SubscriptionCollection) Fresh(ctx context.Context, g auth.Grant, with ...string) (SubscriptionCollection, error) + func (c SubscriptionCollection) Load(ctx context.Context, g auth.Grant, relations ...string) error + func (c SubscriptionCollection) LoadCount(ctx context.Context, g auth.Grant, relations ...string) error + func (c SubscriptionCollection) LoadMissing(ctx context.Context, g auth.Grant, relations ...string) error + func (c SubscriptionCollection) ModelKeys() []any + func (c SubscriptionCollection) Only(keys ...any) SubscriptionCollection + func (c SubscriptionCollection) Pluck(column string) []any + func (c SubscriptionCollection) Rows() model.Rows + func (c SubscriptionCollection) ToArray() []map[string]any + func (c SubscriptionCollection) Unique() SubscriptionCollection + type SubscriptionQuery struct + func Subscriptions(db model.DB) *SubscriptionQuery + func (q *SubscriptionQuery) AddSelect(columns ...any) *SubscriptionQuery + func (q *SubscriptionQuery) Avg(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *SubscriptionQuery) Base() *model.Builder + func (q *SubscriptionQuery) Chunk(ctx context.Context, g auth.Grant, count int, ...) error + func (q *SubscriptionQuery) Clone() *SubscriptionQuery + func (q *SubscriptionQuery) Count(ctx context.Context, g auth.Grant, columns ...any) (int64, error) + func (q *SubscriptionQuery) Create(ctx context.Context, g auth.Grant, attributes map[string]any) (*Subscription, error) + func (q *SubscriptionQuery) Cursor(ctx context.Context, g auth.Grant) iter.Seq2[*Subscription, error] + func (q *SubscriptionQuery) CursorPaginate(ctx context.Context, g auth.Grant, perPage int, cursor *pagination.Cursor, ...) (SubscriptionCollection, *pagination.CursorPage, error) + func (q *SubscriptionQuery) Decrement(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *SubscriptionQuery) Delete(ctx context.Context, g auth.Grant) (int64, error) + func (q *SubscriptionQuery) DoesntExist(ctx context.Context, g auth.Grant) (bool, error) + func (q *SubscriptionQuery) DoesntHave(relation, boolean string, callback func(*query.Builder)) *SubscriptionQuery + func (q *SubscriptionQuery) Each(ctx context.Context, g auth.Grant, count int, ...) error + func (q *SubscriptionQuery) Exists(ctx context.Context, g auth.Grant) (bool, error) + func (q *SubscriptionQuery) Find(ctx context.Context, g auth.Grant, id any, columns ...any) (*Subscription, error) + func (q *SubscriptionQuery) FindMany(ctx context.Context, g auth.Grant, ids []any, columns ...any) (SubscriptionCollection, error) + func (q *SubscriptionQuery) FindOrFail(ctx context.Context, g auth.Grant, id any, columns ...any) (*Subscription, error) + func (q *SubscriptionQuery) FindOrNew(ctx context.Context, g auth.Grant, id any, columns ...any) (*Subscription, error) + func (q *SubscriptionQuery) First(ctx context.Context, g auth.Grant, columns ...any) (*Subscription, error) + func (q *SubscriptionQuery) FirstOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Subscription, error) + func (q *SubscriptionQuery) FirstOrFail(ctx context.Context, g auth.Grant, columns ...any) (*Subscription, error) + func (q *SubscriptionQuery) FirstOrNew(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Subscription, error) + func (q *SubscriptionQuery) FirstWhere(ctx context.Context, g auth.Grant, column any, args ...any) (*Subscription, error) + func (q *SubscriptionQuery) ForPage(page, perPage int) *SubscriptionQuery + func (q *SubscriptionQuery) ForceCreate(ctx context.Context, g auth.Grant, attributes map[string]any) (*Subscription, error) + func (q *SubscriptionQuery) Get(ctx context.Context, g auth.Grant, columns ...any) (SubscriptionCollection, error) + func (q *SubscriptionQuery) GroupBy(groups ...any) *SubscriptionQuery + func (q *SubscriptionQuery) Has(relation, operator string, count int, boolean string, ...) *SubscriptionQuery + func (q *SubscriptionQuery) Increment(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *SubscriptionQuery) Insert(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *SubscriptionQuery) InsertOrIgnore(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *SubscriptionQuery) Join(table any, first any, args ...any) *SubscriptionQuery + func (q *SubscriptionQuery) Latest(column ...string) *SubscriptionQuery + func (q *SubscriptionQuery) Limit(value int) *SubscriptionQuery + func (q *SubscriptionQuery) Max(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *SubscriptionQuery) Min(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *SubscriptionQuery) New() (*Subscription, error) + func (q *SubscriptionQuery) Offset(value int) *SubscriptionQuery + func (q *SubscriptionQuery) Oldest(column ...string) *SubscriptionQuery + func (q *SubscriptionQuery) OrDoesntHave(relation string) *SubscriptionQuery + func (q *SubscriptionQuery) OrHas(relation, operator string, count int) *SubscriptionQuery + func (q *SubscriptionQuery) OrWhere(column any, args ...any) *SubscriptionQuery + func (q *SubscriptionQuery) OrWhereDoesntHave(relation string, callback func(*query.Builder)) *SubscriptionQuery + func (q *SubscriptionQuery) OrWhereHas(relation string, callback func(*query.Builder)) *SubscriptionQuery + func (q *SubscriptionQuery) OrWhereNot(column any, args ...any) *SubscriptionQuery + func (q *SubscriptionQuery) OrWhereRelation(relation string, column any, args ...any) *SubscriptionQuery + func (q *SubscriptionQuery) OrderBy(column any, direction ...string) *SubscriptionQuery + func (q *SubscriptionQuery) OrderByDesc(column any) *SubscriptionQuery + func (q *SubscriptionQuery) Paginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (SubscriptionCollection, *pagination.LengthAwarePage, error) + func (q *SubscriptionQuery) Pluck(ctx context.Context, g auth.Grant, column string) ([]any, error) + func (q *SubscriptionQuery) Select(columns ...any) *SubscriptionQuery + func (q *SubscriptionQuery) SelectRaw(expression string, bindings ...any) *SubscriptionQuery + func (q *SubscriptionQuery) SimplePaginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (SubscriptionCollection, *pagination.Page, error) + func (q *SubscriptionQuery) Sole(ctx context.Context, g auth.Grant, columns ...any) (*Subscription, error) + func (q *SubscriptionQuery) SoleValue(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *SubscriptionQuery) Sum(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *SubscriptionQuery) Touch(ctx context.Context, g auth.Grant, column ...string) (int64, error) + func (q *SubscriptionQuery) Update(ctx context.Context, g auth.Grant, values map[string]any) (int64, error) + func (q *SubscriptionQuery) UpdateOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Subscription, error) + func (q *SubscriptionQuery) Upsert(ctx context.Context, g auth.Grant, values []map[string]any, ...) (int64, error) + func (q *SubscriptionQuery) Value(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *SubscriptionQuery) ValueOrFail(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *SubscriptionQuery) Where(column any, args ...any) *SubscriptionQuery + func (q *SubscriptionQuery) WhereBelongsTo(relationshipName string, related ...model.Entity) *SubscriptionQuery + func (q *SubscriptionQuery) WhereBetween(column any, from, to any) *SubscriptionQuery + func (q *SubscriptionQuery) WhereColumn(first any, args ...any) *SubscriptionQuery + func (q *SubscriptionQuery) WhereDoesntHave(relation string, callback func(*query.Builder)) *SubscriptionQuery + func (q *SubscriptionQuery) WhereExists(callback func(*query.Builder)) *SubscriptionQuery + func (q *SubscriptionQuery) WhereHas(relation string, callback func(*query.Builder)) *SubscriptionQuery + func (q *SubscriptionQuery) WhereHasCount(relation string, callback func(*query.Builder), operator string, count int) *SubscriptionQuery + func (q *SubscriptionQuery) WhereIn(column any, values []any) *SubscriptionQuery + func (q *SubscriptionQuery) WhereKey(id any) *SubscriptionQuery + func (q *SubscriptionQuery) WhereNot(column any, args ...any) *SubscriptionQuery + func (q *SubscriptionQuery) WhereNotExists(callback func(*query.Builder)) *SubscriptionQuery + func (q *SubscriptionQuery) WhereNotIn(column any, values []any) *SubscriptionQuery + func (q *SubscriptionQuery) WhereNotNull(columns ...any) *SubscriptionQuery + func (q *SubscriptionQuery) WhereNull(columns ...any) *SubscriptionQuery + func (q *SubscriptionQuery) WhereRelation(relation string, column any, args ...any) *SubscriptionQuery + func (q *SubscriptionQuery) With(relations ...string) *SubscriptionQuery + func (q *SubscriptionQuery) WithAvg(relation, column string) *SubscriptionQuery + func (q *SubscriptionQuery) WithCount(relations ...string) *SubscriptionQuery + func (q *SubscriptionQuery) WithExists(relation string) *SubscriptionQuery + func (q *SubscriptionQuery) WithMax(relation, column string) *SubscriptionQuery + func (q *SubscriptionQuery) WithMin(relation, column string) *SubscriptionQuery + func (q *SubscriptionQuery) WithSum(relation, column string) *SubscriptionQuery + func (q *SubscriptionQuery) Without(relations ...string) *SubscriptionQuery + func (q *SubscriptionQuery) WithoutGlobalScope(identifier string) *SubscriptionQuery + func (q *SubscriptionQuery) WithoutGlobalScopes(identifiers ...string) *SubscriptionQuery + type SubscriptionResource struct + CancelAtPeriodEnd bool + CanceledAt *time.Time + CouponID string + CouponRenewalsLeft int + CreatedAt time.Time + CurrentPeriodEnd time.Time + CurrentPeriodStart time.Time + EndedAt *time.Time + GraceDays int + ID string + Meta map[string]string + PlanID string + Reference string + Renewals int + Status SubscriptionStatus + TenantID string + TrialEndsAt *time.Time + func NewSubscriptionResource(s Subscription) SubscriptionResource + func (SubscriptionResource) With() map[string]any + func (r SubscriptionResource) ToArray() map[string]any + type SubscriptionRow struct + AdminCancelURL string + CancelURL string + Cancelling bool + Ended bool + ID string + PaidUntil string + Plan string + Reference string + RenewURL string + Serving bool + Started string + Status string + StatusKey string + Tenant string + type SubscriptionStatus string + const SubscriptionActive + const SubscriptionCanceled + const SubscriptionExpired + const SubscriptionPastDue + const SubscriptionTrialing + type SubscriptionsPageData struct + CanManage bool + Rows []SubscriptionRow + Table TableState + type TableState struct + Dir string + Page int + Pages int + Query string + Sort string + Status string + Total int + URL string + type Transition struct + Moved bool + To SubscriptionStatus + func Due(s Subscription, now time.Time) Transition + type URLs struct + func NewURLs(prefix, adminPrefix, notificationPrefix string, paths Paths) URLs + func (u URLs) AdminCancel(id string) string + func (u URLs) AdminConfirm(id string) string + func (u URLs) AdminCoupon(id string) string + func (u URLs) AdminCoupons() string + func (u URLs) AdminInvoices() string + func (u URLs) AdminPlan(id string) string + func (u URLs) AdminPlans() string + func (u URLs) AdminPrefix() string + func (u URLs) AdminSubscriptions() string + func (u URLs) AdminVoid(id string) string + func (u URLs) Cancel(id string) string + func (u URLs) Checkout(planID string) string + func (u URLs) Invoice(id string) string + func (u URLs) Invoices() string + func (u URLs) Notification(provider string) string + func (u URLs) Plans() string + func (u URLs) Prefix() string + func (u URLs) Renew(id string) string + func (u URLs) Return(id string) string + func (u URLs) Subscriptions() string + func (u URLs) Trial(planID string) string