implemented post handler
This commit is contained in:
@@ -7,5 +7,4 @@ type Post struct {
|
||||
Title string `gorm:"not null"`
|
||||
Content string `gorm:"type:text; not null"`
|
||||
AuthorID uint // foreign key to User
|
||||
Author User `gorm:"constraint:OnUpdate:CASCADE,OnDelete:SET NULL;"` // optional relation
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user