implemented post creation, deletion and update api

This commit is contained in:
2025-11-18 23:25:56 +00:00
parent a1152dfba5
commit 5013b67db2
3 changed files with 27 additions and 7 deletions

View File

@@ -6,5 +6,5 @@ type Post struct {
gorm.Model // includes ID, CreatedAt, UpdatedAt, DeletedAt
Title string `gorm:"not null"`
Content string `gorm:"type:text; not null"`
AuthorID uint // foreign key to User
Author string `gorm:"not null"`
}