Channel history

This commit is contained in:
2024-03-30 18:21:17 +08:00
parent d5093d7b9c
commit 8e31675317
8 changed files with 150 additions and 21 deletions

View File

@ -27,9 +27,7 @@ type Attachment struct {
Type AttachmentType `json:"type"`
ExternalUrl string `json:"external_url"`
Author Account `json:"author"`
ArticleID *uint `json:"article_id"`
MomentID *uint `json:"moment_id"`
CommentID *uint `json:"comment_id"`
MessageID *uint `json:"message_id"`
AuthorID uint `json:"author_id"`
}

View File

@ -13,9 +13,10 @@ const (
type Message struct {
BaseModel
Content string `json:"content"`
Metadata datatypes.JSONMap `json:"metadata"`
Type MessageType `json:"type"`
ChannelID uint `json:"channel_id"`
SenderID uint `json:"sender_id"`
Content string `json:"content"`
Metadata datatypes.JSONMap `json:"metadata"`
Type MessageType `json:"type"`
Attachments []Attachment `json:"attachments"`
ChannelID uint `json:"channel_id"`
SenderID uint `json:"sender_id"`
}