user

package
v0.0.0-...-61fa424 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2021 License: MIT Imports: 8 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 {
	ID             uint
	Name           string
	OwnerID        uint
	OwnerType      string
	Username       string          `json:"username" gorm:"unique"`
	FirstName      string          `json:"first_name"`
	LastName       string          `json:"last_name"`
	Phone          string          `json:"phone"`
	BirthDate      int64           `json:"birth_date"`
	Website        string          `json:"website"`
	Biography      string          `json:"biography"`
	Gender         gender.Gender   `json:"gender"`
	Public         bool            `json:"public"`
	Taggable       bool            `json:"taggable"`
	Active         bool            `json:"active"`
	Email          string          `json:"email" gorm:"unique"`
	Favorites      []post.PostUser `gorm:"many2many:favorites;joinForeignKey:UserID;JoinReferences:PostUserID"`
	Muted          []User          `gorm:"many2many:user_muted;joinForeignKey:UserID;JoinReferences:MutedUser"`
	Blocked        []User          `gorm:"many2many:user_blocked;joinForeignKey:UserID;JoinReferences:BlockedUser"`
	Following      []User          `gorm:"many2many:user_following;joinForeignKey:UserID;JoinReferences:FollowedUser"`
	FollowedBy     []User          `gorm:"many2many:user_following;joinForeignKey:UserID;JoinReferences:FollowedUser"`
	FollowRequests []User          `gorm:"many2many:user_followRequests;joinForeignKey:UserID;JoinReferences:FollowRequestsUser"`
}

func (*User) Validate

func (u *User) Validate() rest_error.RestErr

Jump to

Keyboard shortcuts

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