model

package
v0.0.0-...-9d12082 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSON

type JSON []byte

func (JSON) Equals

func (j JSON) Equals(j1 JSON) bool

func (JSON) IsNull

func (j JSON) IsNull() bool

func (JSON) MarshalJSON

func (m JSON) MarshalJSON() ([]byte, error)

func (*JSON) Scan

func (j *JSON) Scan(value interface{}) error

func (*JSON) UnmarshalJSON

func (m *JSON) UnmarshalJSON(data []byte) error

func (JSON) Value

func (j JSON) Value() (driver.Value, error)

type PasswordReset

type PasswordReset struct {
	ID        uint       `gorm:"primary_key" json:"id"`
	UserID    uint       `gorm:"" json:"user_id"`
	Email     string     `gorm:"not null" json:"email"`
	Token     string     `gorm:"" json:"token"`
	CreatedAt time.Time  `json:"created_at"`
	UpdatedAt time.Time  `json:"updated_at"`
	DeletedAt *time.Time `json:"deleted_at" sql:"index"`
}

type User

type User struct {
	ID           uint       `gorm:"primary_key" json:"id"`
	FirstName    string     `gorm:"not null" json:"firstname" validate:"required"`
	LastName     string     `gorm:"not null" json:"lastname" validate:"required"`
	Username     string     `gorm:"not null;unique" json:"username" validate:"required"`
	Email        string     `gorm:"not null;unique_index" json:"email" validate:"required,email"`
	Login        string     `gorm:"-" json:"login,omitempty"`
	Role         string     `json:"role" csv:"ROLE,role"`
	Password     string     `gorm:"-" json:"password,omitempty" validate:"min=6"`
	PasswordHash string     `gorm:"not null" json:"-"`
	Status       string     `gorm:"default:'ACTIVE'" json:"status"`
	Timezone     string     `gorm:"default:NULL" json:"timezone"`
	CreatedAt    time.Time  `json:"created_at"`
	UpdatedAt    time.Time  `json:"updated_at"`
	DeletedAt    *time.Time `json:"-" sql:"index"`
}

Jump to

Keyboard shortcuts

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