package bll

import (
	"context"
	"github.com/gogf/gf/v2/net/ghttp"
	"yx-dataset-server/app/schema"
)

// IChatMessage ChatMessage业务逻辑接口
type IChatMessage interface {
	// 查询数据
	Query(ctx context.Context, params schema.ChatMessageQueryParam, opts ...schema.ChatMessageQueryOptions) (*schema.ChatMessageQueryResult, error)
	// 查询指定数据
	Get(ctx context.Context, recordID string, opts ...schema.ChatMessageQueryOptions) (*schema.ChatMessage, error)
	// StreamChatMessage 流式对话
	StreamChatMessage(ctx context.Context, r *ghttp.Request, item schema.ChatMessage)
	// ChatMessage 非流式对话
	ChatMessage(ctx context.Context, r *ghttp.Request, item *schema.ChatMessage) (*schema.ChatMessage, error)
	// 更新数据
	Update(ctx context.Context, recordID string, item schema.ChatMessage) (*schema.ChatMessage, error)
	// 删除数据
	Delete(ctx context.Context, recordID string) error
	// 更新状态
	UpdateStatus(ctx context.Context, recordID string, status int) error
}
