forked from mtusi2026/mtusi2026lab3
19 lines
444 B
Go
19 lines
444 B
Go
package repository
|
|
|
|
import (
|
|
"context"
|
|
"highload/internal/model"
|
|
"time"
|
|
)
|
|
|
|
type ChatRepository interface {
|
|
CreateChat(ctx context.Context, title string, memberIDs []string) (*model.Chat, error)
|
|
GetChatByID(ctx context.Context, id string) (*model.Chat, error)
|
|
GetChatsByUserID(ctx context.Context, userID string, limit int, after *ChatPosition) ([]*model.Chat, error)
|
|
}
|
|
|
|
type ChatPosition struct {
|
|
CreatedAt time.Time
|
|
ID string
|
|
}
|