30 lines
599 B
Go
30 lines
599 B
Go
package testutil
|
|
|
|
import (
|
|
"time"
|
|
"github.com/paramah/gw_telegram/internal/domain/entity"
|
|
)
|
|
|
|
func NewTextMessage(chatID, userID int64, text string) entity.Message {
|
|
return entity.Message{
|
|
MessageID: 1,
|
|
ChatID: chatID,
|
|
UserID: userID,
|
|
Username: "testuser",
|
|
Type: entity.MessageTypeText,
|
|
Text: text,
|
|
Timestamp: time.Now(),
|
|
Metadata: make(map[string]any),
|
|
}
|
|
}
|
|
|
|
func NewSession(userID, chatID int64) entity.Session {
|
|
return entity.Session{
|
|
UserID: userID,
|
|
ChatID: chatID,
|
|
Data: make(map[string]any),
|
|
UpdatedAt: time.Now(),
|
|
TTL: 24,
|
|
}
|
|
}
|