adding jwt authentication
This commit is contained in:
@@ -5,6 +5,7 @@ import "gorm.io/gorm"
|
||||
type Post struct {
|
||||
gorm.Model // includes ID, CreatedAt, UpdatedAt, DeletedAt
|
||||
Title string `gorm:"not null"`
|
||||
Content string `gorm:"type:text; not null"`
|
||||
Author string `gorm:"not null"`
|
||||
AuthorID uint
|
||||
Author User `gorm:"foreignKey:AuthorID"`
|
||||
Content string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user