Make chat persistent across reboot
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 3m25s

This commit is contained in:
2026-03-05 21:43:04 +00:00
parent 5346b24999
commit a83b98eb2b
4 changed files with 21 additions and 47 deletions

View File

@@ -30,8 +30,7 @@ type Post struct {
type Message struct {
ID uint `gorm:"primarykey" json:"id"`
Content string `json:"text"`
AuthorID uint `json:"-"`
Author *User `gorm:"foreignKey:AuthorID" json:"author"`
AuthorID uint `json:"authorId"`
CreatedAt time.Time `json:"createdAt"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"deletedAt"`
}