models

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

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  `dynamorm:""`
	Quantity   int     `dynamorm:""`
	Price      float64 `dynamorm:""`
}

OrderItem represents an item in an order

type TestOrder

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

TestOrder is a test model for complex queries

type TestProduct

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

TestProduct is a test model for product data

type TestUser

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

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