models

package
v0.0.0-...-45471de Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MyUserTableName = "my_user"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MyUser

type MyUser struct {
	UserId     string                 `json:"userId"  gorm:"type:varchar(200);primaryKey"   form:"userId"`
	Name       string                 `json:"name"    gorm:"type:varchar(200);not null"     form:"name"`
	NumOfTried optimisticlock.Version `json:"version" gorm:"index"`
	Created    time.Time              `json:"created" gorm:"autoCreateTime"`
	Updated    time.Time              `json:"updated" gorm:"autoUpdateTime"`
	Deleted    gorm.DeletedAt         `json:"deleted" gorm:"index"`
}

func GetMyUserForUpdateInTxn

func GetMyUserForUpdateInTxn(tx *gorm.DB, userId string) (*MyUser, bool, error)

func GetMyUserInTxn

func GetMyUserInTxn(tx *gorm.DB, userId string) (*MyUser, bool, error)

func GetMyUserList

func GetMyUserList(tx *gorm.DB) ([]*MyUser, error)

func (*MyUser) InsertMyUserInTxn

func (myUser *MyUser) InsertMyUserInTxn(tx *gorm.DB) (int64, error)

func (*MyUser) TableName

func (*MyUser) TableName() string

func (*MyUser) UpdateMyUserInTxn

func (myUser *MyUser) UpdateMyUserInTxn(tx *gorm.DB) (int64, error)

Jump to

Keyboard shortcuts

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