user

package
v0.0.0-...-eb626f9 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetModelDB

func GetModelDB(ctx context.Context, defDB *gorm.DB) *gorm.DB

func NewRepository

func NewRepository(db *gorm.DB) user.Repository

Types

type Model

type Model struct {
	ID        string     `gorm:"column:id;primary_key;size:36;"`
	UserName  string     `gorm:"column:user_name;size:64;index;default:'';not null;"`
	RealName  string     `gorm:"column:real_name;size:64;index;default:'';not null;"`
	Password  string     `gorm:"column:password;size:40;default:'';not null;"`
	Email     *string    `gorm:"column:email;size:255;index;"`
	Phone     *string    `gorm:"column:phone;size:20;index;"`
	Status    int        `gorm:"column:status;index;default:0;not null;"`
	Creator   string     `gorm:"column:creator;size:36;"`
	CreatedAt time.Time  `gorm:"column:created_at;index;"`
	UpdatedAt time.Time  `gorm:"column:updated_at;index;"`
	DeletedAt *time.Time `gorm:"column:deleted_at;index;"`
}

func (Model) TableName

func (Model) TableName() string

func (Model) ToDomain

func (a Model) ToDomain() *user.User

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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