This commit is contained in:
Vladislav Kunetskiy
2026-10-01 12:44:59 +03:00
parent c3ac76fa3a
commit 1fdaf6299a
86 changed files with 33334 additions and 16 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)
}