feat: add to field to specify the receiver (close #48)

This commit is contained in:
JustSong
2023-04-16 09:55:23 +08:00
parent 69f503124a
commit 3d38260e5b
10 changed files with 55 additions and 3 deletions
+1
View File
@@ -19,6 +19,7 @@ type Message struct {
HTMLContent string `json:"html_content" gorm:"-:all"`
Timestamp int64 `json:"timestamp" gorm:"type:int64"`
Link string `json:"link" gorm:"unique;index"`
To string `json:"to" gorm:"column:to"` // if specified, will send to this user(s)
}
func GetMessageById(id int, userId int) (*Message, error) {