dao

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitAutoMigrateTable

func InitAutoMigrateTable(db *gorm.DB)

Types

type User

type User struct {
	Id          int32  `gorm:"primaryKey, autoIncrement"`
	Email       string `gorm:"unique"`
	Password    string
	NickName    string
	Description string
	Avatar      string
	BirthDay    int64
	CreateAt    int64
	UpdateAt    int64
	DeleteAt    int64
}

type UserI

type UserI interface {
	CreateUser(ctx context.Context, user User) (int32, error)
	UpdateUserInfoByUid(ctx context.Context, user User) (User, error)
	FindUserByEmail(ctx context.Context, email string) (User, error)
	DeleteUser(ctx context.Context, uid int32) error
}

func NewUserDao

func NewUserDao(db *gorm.DB, logger *zap.Logger) UserI

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳