Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Article ¶
type Article struct { gorm.Model Slug string `gorm:"unique_index;not null"` Title string `gorm:"not null"` Description string Body string Author User AuthorID uint Comments []Comment Favorites []User `gorm:"many2many:favorites;"` Tags []Tag `gorm:"many2many:article_tags;association_autocreate:false"` }
type User ¶
type User struct { gorm.Model Username string `gorm:"unique_index;not null"` Email string `gorm:"unique_index;not null"` Password string `gorm:"not null"` Bio *string Image *string Followers []Follow `gorm:"foreignkey:FollowingID"` Followings []Follow `gorm:"foreignkey:FollowerID"` Favorites []Article `gorm:"many2many:favorites;"` }
func (*User) CheckPassword ¶
func (*User) FollowedBy ¶
FollowedBy Followings should be pre loaded
Click to show internal directories.
Click to hide internal directories.