Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comment ¶
type Comment struct { Model Text string `gorm:"type:TEXT" json:"text"` Post Post `gorm:"foreignkey:Post" json:"post"` Author uint `gorm:"foreignkey:User" json:"author"` }
func GetCommentsByPostId ¶
type Post ¶
type PostResponse ¶
type PostResponse struct { ID uint `json:"id"` Title string `json:"title"` Content string `json:"content"` Author uint `json:"user"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` }
func FindPostsByAuthor ¶
func FindPostsByAuthor(db *gorm.DB, authorid uint64) (post []PostResponse, err error)
Click to show internal directories.
Click to hide internal directories.