tests

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertObjEqual

func AssertObjEqual(r, e any, names ...string)

Types

type User

type User struct {
	ID         int64      `gorm:"column:id"`
	Name       string     `gorm:"column:name"`
	Age        uint       `gorm:"column:age"`
	Birthday   *time.Time `gorm:"column:birthday"`
	CompanyID  *int       `gorm:"column:company_id"`
	ManagerID  *uint      `gorm:"column:manager_id"`
	Active     bool       `gorm:"column:active"`
	CreateTime time.Time  `gorm:"column:create_time"`
	UpdateTime time.Time  `gorm:"column:update_time"`
	IsDeleted  bool       `gorm:"column:is_deleted"`
}

func (User) TableName added in v0.1.3

func (u User) TableName() string

type UserUpdate added in v0.1.3

type UserUpdate struct {
	ID         *int64     `sql_field:"id"`
	Name       *string    `sql_field:"name"`
	Age        *uint      `sql_field:"age"`
	Birthday   *time.Time `sql_field:"birthday"`
	CompanyID  *int       `sql_field:"company_id"`
	ManagerID  *uint      `sql_field:"manager_id"`
	Active     *bool      `sql_field:"active"`
	CreateTime *time.Time `sql_field:"create_time"`
	UpdateTime *time.Time `sql_field:"update_time"`
	IsDeleted  *bool      `sql_field:"is_deleted"`
}

type UserWhere added in v0.1.3

type UserWhere struct {
	ID        *int64  `sql_field:"id"`
	Name      *string `sql_field:"name"`
	Age       *uint   `sql_field:"age"`
	CompanyID *int    `sql_field:"company_id"`
	ManagerID *uint   `sql_field:"manager_id"`
	Active    *bool   `sql_field:"active"`
	IsDeleted *bool   `sql_field:"is_deleted"`

	BirthdayGE   *time.Time `sql_field:"birthday" sql_operator:">="`
	BirthdayLT   *time.Time `sql_field:"birthday" sql_operator:"<"`
	CreateTimeGE *time.Time `sql_field:"create_time" sql_operator:">="`
	CreateTimeLT *time.Time `sql_field:"create_time" sql_operator:"<"`
	UpdateTimeGE *time.Time `sql_field:"update_time" sql_operator:">="`
	UpdateTimeLT *time.Time `sql_field:"update_time" sql_operator:"<"`

	CompanyIDIn []int  `sql_field:"company_id" sql_operator:"in"`
	ManagerIDIn []uint `sql_field:"manager_id" sql_operator:"in"`
}

func (UserWhere) ForceIndex added in v0.1.3

func (where UserWhere) ForceIndex() string

func (*UserWhere) InjectDefault added in v0.1.3

func (where *UserWhere) InjectDefault()

Jump to

Keyboard shortcuts

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