package interfaces

import (
    "github.com/Nanqipro/YunQue-Tech-Projects/ai_english_learning/serve/internal/common"
    "github.com/Nanqipro/YunQue-Tech-Projects/ai_english_learning/serve/internal/models"
)

// VocabularyServiceInterface 定义词汇服务接口，需与 VocabularyService 保持一致
type VocabularyServiceInterface interface {
    // 分类管理
    GetCategories(page, pageSize int, level string) (*common.PaginationData, error)
    CreateCategory(name, description, level string) (*models.VocabularyCategory, error)
    UpdateCategory(categoryID string, updates map[string]interface{}) (*models.VocabularyCategory, error)
    DeleteCategory(categoryID string) error

    // 词汇管理
    GetVocabulariesByCategory(categoryID string, page, pageSize int, level string) (*common.PaginationData, error)
    GetVocabularyByID(vocabularyID string) (*models.Vocabulary, error)
    CreateVocabulary(word, phonetic, level string, frequency int, categoryID string, definitions, examples, images []string) (*models.Vocabulary, error)
    UpdateVocabulary(id string, vocabulary *models.Vocabulary) error
    DeleteVocabulary(id string) error

    // 学习进度与统计
    GetUserVocabularyProgress(userID int64, vocabularyID string) (*models.UserVocabularyProgress, error)
    UpdateUserVocabularyProgress(userID int64, vocabularyID string, updates map[string]interface{}) (*models.UserVocabularyProgress, error)
    GetUserVocabularyStats(userID int64) (map[string]interface{}, error)

    // 测试相关
    GetVocabularyTest(testID string) (*models.VocabularyTest, error)
    CreateVocabularyTest(userID int64, testType, level string, totalWords int) (*models.VocabularyTest, error)
    UpdateVocabularyTestResult(testID string, correctWords int, score float64, duration int) error

    // 搜索与每日统计
    SearchVocabularies(keyword string, level string, page, pageSize int) (*common.PaginationData, error)
    GetDailyStats(userID string) (map[string]interface{}, error)
}