users

package
v0.0.0-...-fe735be Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2021 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 User

type User struct {
	models.Model
	Username  string   `gorm:"column:username;not null;unique_index:username" json:"username" form:"username"`
	Firstname string   `gorm:"column:firstname;not null;" json:"firstname" form:"firstname"`
	Lastname  string   `gorm:"column:lastname;not null;" json:"lastname" form:"lastname"`
	Hash      string   `gorm:"column:hash;not null;" json:"hash"`
	Role      UserRole `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
}

User ..

func (*User) BeforeCreate

func (m *User) BeforeCreate(*gorm.DB) error

BeforeCreate ...

func (*User) BeforeUpdate

func (m *User) BeforeUpdate(*gorm.DB) error

BeforeUpdate ...

type UserRole

type UserRole struct {
	models.Model
	UserID   uint64 `gorm:"column:user_id;unique_index:user_role;not null;" json:"user_id"`
	RoleName string `gorm:"column:role_name;not null;" json:"role_name"`
}

UserRole ...

func (*UserRole) BeforeCreate

func (m *UserRole) BeforeCreate(*gorm.DB) error

BeforeCreate ...

func (*UserRole) BeforeUpdate

func (m *UserRole) BeforeUpdate(*gorm.DB) error

BeforeUpdate ...

Jump to

Keyboard shortcuts

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