review

package
v1.37.4 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IgnoreFieldMismatch = datastore.IgnoreFieldMismatch

Functions

func Query

Query returns a datastore query for reviews.

Types

type Review

type Review struct {
	mixin.Model[Review]

	UserId string `json:"userId"`

	ProductId string `json:"productId"`
	VariantId string `json:"variantId"`

	Name    string `json:"name"`
	Device  string `json:"device"`
	Comment string `json:"comment" datastore:",noindex"`
	Rating  int    `json:"rating"`

	Enabled bool `json:"-"`

	Metadata  Map    `json:"metadata,omitempty" datastore:"-" orm:"default:{}"`
	Metadata_ string `json:"-" datastore:",noindex"`
}

func Fake

func Fake(db *datastore.Datastore, userId, productId string) *Review

func New

func New(db *datastore.Datastore) *Review

New creates a new Review wired to the given datastore.

func (*Review) Load

func (r *Review) Load(p []datastore.Property) (err error)

func (*Review) Save

func (r *Review) Save() (p []datastore.Property, err error)

Jump to

Keyboard shortcuts

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