Basic realtime text command

This commit is contained in:
2024-03-30 17:10:36 +08:00
parent 23989f98b6
commit d5093d7b9c
15 changed files with 304 additions and 21 deletions

21
pkg/models/messages.go Normal file
View File

@ -0,0 +1,21 @@
package models
import "gorm.io/datatypes"
type MessageType = uint8
const (
MessageTypeText = MessageType(iota)
MessageTypeAudio
MessageTypeFile
)
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"`
}