adding jwt authentication

This commit is contained in:
2025-11-30 01:40:06 +00:00
parent cd16056966
commit f5935e9f52
6 changed files with 216 additions and 59 deletions

View File

@@ -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
}