user

package
v0.0.0-...-43618a6 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MarshallUser

type MarshallUser struct {
	Id        int64   `json:"id"`
	Username  string  `json:"username"`
	Email     *string `json:"email"`
	Avatar    *string `json:"avatar"`
	IsSpecial bool    `json:"is_special"`
}

type User

type User struct {
	gorm.Model
	ID          uint64  `json:"id" gorm:"primaryKey"`
	Username    string  `json:"username" gorm:"unique"`
	Email       *string `json:"email" gorm:"unique"`
	Password    string  `json:"password"`
	Avatar      *string `json:"avatar"`
	Phonenumber *string `json:"phone_number" gorm:"unique"`
	IsSpecial   bool    `json:"is_special"`
}

func (User) Marshall

func (u User) Marshall() MarshallUser

func (*User) Validate

func (u *User) Validate(action string) error

Jump to

Keyboard shortcuts

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