factory

package
v1.1.11 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2022 License: LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Product = &ProductFactory{gofactory.New(
	&model.Product{},
	attr.Str("UID", genutil.RandName(3)),
	attr.Attr("Buyer", genutil.FixInterface(nil)),
	attr.Str("Price", genutil.RandName(3)),
	attr.Str("Quantity", genutil.RandName(3)),
	attr.Str("Discount", genutil.RandName(3)),
	attr.Time("CreatedAt", genutil.Now(time.UTC)),
	attr.Time("DeletedAt", genutil.Now(time.UTC)),
)}
View Source
var User = &UserFactory{gofactory.New(
	&model.User{},
	attr.Int("ID", genutil.SeqInt(1, 1)),
	attr.Str("Name", genutil.RandName(3)),
	attr.Int("Gender", genutil.SeqInt(1, 1)),
	attr.Str("Phone", genutil.RandName(3)),
	attr.Str("Address", genutil.RandName(3)),
	attr.Time("CreatedAt", genutil.Now(time.UTC)),
	attr.Time("UpdatedAt", genutil.Now(time.UTC)),
	attr.Bytes("Password", genutil.FixBytes([]byte("test"))),
)}

Functions

This section is empty.

Types

type ProductFactory

type ProductFactory struct {
	*gofactory.Factory
}

type UserFactory

type UserFactory struct {
	*gofactory.Factory
}

Jump to

Keyboard shortcuts

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