This commit is contained in:
Vladislav Kunetskiy
2026-10-15 20:52:41 +03:00
parent 0ab3a341aa
commit 4300d49c20
81 changed files with 33189 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
package domain
import (
"time"
"github.com/google/uuid"
)
type Message struct {
ID uuid.UUID
ChatID uuid.UUID
SenderID uuid.UUID
Text string
CreatedAt time.Time
}
type MessageDraft struct {
ChatID uuid.UUID
SenderID uuid.UUID
Text string
}
func (d MessageDraft) Validate() error {
return validateNotBlank("text", d.Text)
}