user

package
v0.0.0-...-353a0ab Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GormRepository

type GormRepository struct {
	DB *gorm.DB
}

func NewGormDBRepository

func NewGormDBRepository(db *gorm.DB) *GormRepository

func (*GormRepository) RepoFuncForUser

func (repo *GormRepository) RepoFuncForUser() error

InsertUser Insert new User into storage

type User

type User struct {
	ID           uint
	CreatedAt    time.Time
	UpdatedAt    time.Time
	DeletedAt    *time.Time
	Name         string `json:"name"  validate:"required"`
	Email        string `json:"email" validate:"required,email" gorm:"type:varchar(20)"`
	Phone_number string `json:"phone_number" validate:"required,number"`
	Password     string `json:"password"  validate:"required"`
	Address      string `json:"address"  validate:"required"`
	Role         int
	Token_hash   string
}

Jump to

Keyboard shortcuts

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