This commit is contained in:
@@ -12,7 +12,9 @@ type Post struct {
|
||||
TLDR string `json:"tldr"`
|
||||
Content string `json:"content"`
|
||||
Comments []Comment
|
||||
UserID uint `gorm:"->;<-:create"`
|
||||
UserID uint `gorm:"->;<-:create"`
|
||||
Private bool `json:"private" gorm:"-"`
|
||||
Secret *string `json:"secret,omitempty" gorm:"->;<-:create;unique"`
|
||||
}
|
||||
|
||||
// Comment represents a comment on a post, including its ID, post association, content, and creator.
|
||||
|
||||
Reference in New Issue
Block a user