Add complete database schema and ORM models (#4)
This commit was merged in pull request #4.
This commit is contained in:
20
internal/models/message.go
Normal file
20
internal/models/message.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// Message represents a chat message (channel or DM).
|
||||
type Message struct {
|
||||
Base
|
||||
|
||||
ID string `json:"id"`
|
||||
Timestamp time.Time `json:"ts"`
|
||||
FromUserID string `json:"fromUserId"`
|
||||
FromNick string `json:"from"`
|
||||
Target string `json:"to"`
|
||||
Type string `json:"type"`
|
||||
Body string `json:"body"`
|
||||
Meta string `json:"meta"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
}
|
||||
Reference in New Issue
Block a user