models

package
v6.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrderItem

type OrderItem struct {
	ProductSKU string  `theorydb:""`
	Quantity   int     `theorydb:""`
	Price      float64 `theorydb:""`
}

OrderItem represents an item in an order

type TestOrder

type TestOrder struct {
	CreatedAt  time.Time   `theorydb:"index:gsi-customer,sk"`
	UpdatedAt  time.Time   `theorydb:""`
	OrderID    string      `theorydb:"pk"`
	CustomerID string      `theorydb:"sk,index:gsi-customer,pk"`
	Status     string      `theorydb:"index:gsi-status,pk"`
	Items      []OrderItem `theorydb:""`
	Total      float64     `theorydb:"index:gsi-status,sk"`
}

TestOrder is a test model for complex queries

type TestProduct

type TestProduct struct {
	CreatedAt   time.Time `theorydb:""`
	SKU         string    `theorydb:"pk"`
	Category    string    `theorydb:"sk,index:gsi-category,pk"`
	Name        string    `theorydb:""`
	Description string    `theorydb:""`
	Price       float64   `theorydb:"index:gsi-category,sk"`
	InStock     bool      `theorydb:""`
}

TestProduct is a test model for product data

type TestUser

type TestUser struct {
	CreatedAt time.Time `theorydb:"index:gsi-email,sk"`
	ID        string    `theorydb:"pk"`
	Email     string    `theorydb:"sk,index:gsi-email,pk"`
	Status    string    `theorydb:""`
	Name      string    `theorydb:""`
	Tags      []string  `theorydb:""`
	Age       int       `theorydb:""`
}

TestUser is a test model for user data

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL