22 lines
422 B
Go
22 lines
422 B
Go
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"`
|
|
}
|