entities

package
v0.0.0-...-5dfee32 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	Id        uuid.UUID `gorm:"type:uuid;primaryKey;unique"`
	CreatedAt time.Time
	UpdatedAt *time.Time     `gorm:"default:null"`
	DeletedAt gorm.DeletedAt `gorm:"index"`
}

func (*Base) BeforeCreate

func (base *Base) BeforeCreate(*gorm.DB) (err error)

type User

type User struct {
	Base
	UserName string `gorm:"size:255;not null;unique"`
	Email    string `gorm:"size:100;not null;unique"`
	Password string `gorm:"size:255;not null;"`
}

func (*User) CheckPassword

func (u *User) CheckPassword(providedPassword string) error

func (*User) HashPassword

func (u *User) HashPassword(password string)

func (*User) ToUserVm

func (u *User) ToUserVm() *view_models.User

Jump to

Keyboard shortcuts

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