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
Click to show internal directories.
Click to hide internal directories.