Files
mtusi2026lab3/internal/repository/message.go
T

18 lines
401 B
Go

package repository
import (
"context"
"highload/internal/model"
"time"
)
type MessageRepository interface {
CreateMessage(ctx context.Context, chatID, senderID, text, key string) (*model.Message, error)
GetMessagesByChatID(ctx context.Context, chatID string, limit int, after *MessagePosition) ([]*model.Message, error)
}
type MessagePosition struct {
CreatedAt time.Time
ID string
}