repository

package
v0.0.0-...-4d35d9b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Db

type Db struct {
	// contains filtered or unexported fields
}

func NewDb

func NewDb(db *gorm.DB) *Db

func (*Db) CheckUserExistsByEmail

func (d *Db) CheckUserExistsByEmail(email string) (bool, error)

func (*Db) DeleteUser

func (d *Db) DeleteUser(user *User) error

func (*Db) LoadUserByUsername

func (d *Db) LoadUserByUsername(username string) (*User, error)

func (*Db) SaveUser

func (d *Db) SaveUser(user *User) (*User, error)

func (*Db) UpdateUser

func (d *Db) UpdateUser(user *User) (*User, error)

type User

type User struct {
	UserId string `gorm:"column:user_id;primaryKey"`

	UserName  string `gorm:"column:user_name;not null;unique"`
	AliasName string `gorm:"column:alias_name;not null"`
	Password  string `gorm:"column:password;not null"`

	UserStatus int `gorm:"column:user_status;not null;default:0"`

	CreatedAt int64 `gorm:"column:created_at;autoCreateTime:milli"`
	UpdatedAt int64 `gorm:"column:updated_at;autoUpdateTime:milli"`
	DeletedAt int64 `gorm:"column:deleted_at"`
}

func (*User) TableName

func (u *User) TableName() string

Jump to

Keyboard shortcuts

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