删除文档中关于script文件夹的信息
This commit is contained in:
parent
df76625007
commit
48730369e5
@ -66,8 +66,6 @@ func MiddlewareName() gin.HandlerFunc {
|
|||||||
- [ai_grading.go](internal/services/ai_grading.go) - AI评分服务
|
- [ai_grading.go](internal/services/ai_grading.go) - AI评分服务
|
||||||
- **internal/database/** - 数据库连接和初始化
|
- **internal/database/** - 数据库连接和初始化
|
||||||
- **pkg/config/** - 配置管理(数据库配置、AI配置等)
|
- **pkg/config/** - 配置管理(数据库配置、AI配置等)
|
||||||
- **scripts/** - 工具脚本
|
|
||||||
- [import_questions.go](scripts/import_questions.go) - 题目数据导入脚本
|
|
||||||
|
|
||||||
## 常用命令
|
## 常用命令
|
||||||
|
|
||||||
@ -84,9 +82,6 @@ go fmt ./...
|
|||||||
|
|
||||||
# 检查代码常见问题
|
# 检查代码常见问题
|
||||||
go vet ./...
|
go vet ./...
|
||||||
|
|
||||||
# 导入练习题数据(首次运行需要)
|
|
||||||
go run scripts/import_questions.go
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### 构建
|
### 构建
|
||||||
|
|||||||
@ -143,14 +143,6 @@ go build -o bin/server.exe main.go
|
|||||||
- `updated_at` - 更新时间
|
- `updated_at` - 更新时间
|
||||||
- `deleted_at` - 软删除时间
|
- `deleted_at` - 软删除时间
|
||||||
|
|
||||||
### 数据导入
|
|
||||||
|
|
||||||
首次运行项目需要导入练习题数据:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# 确保 practice_question_pool.json 文件在项目根目录
|
|
||||||
go run scripts/import_questions.go
|
|
||||||
```
|
|
||||||
|
|
||||||
## AI评分配置
|
## AI评分配置
|
||||||
|
|
||||||
|
|||||||
@ -73,12 +73,7 @@ type PracticeProgress struct {
|
|||||||
psql -U your_username -d your_database
|
psql -U your_username -d your_database
|
||||||
```
|
```
|
||||||
|
|
||||||
2. **执行 SQL 脚本**:
|
2. **手动执行 SQL**:
|
||||||
```bash
|
|
||||||
\i scripts/fix_practice_progress_index.sql
|
|
||||||
```
|
|
||||||
|
|
||||||
或手动执行:
|
|
||||||
```sql
|
```sql
|
||||||
-- 删除旧索引
|
-- 删除旧索引
|
||||||
DROP INDEX IF EXISTS idx_user_question;
|
DROP INDEX IF EXISTS idx_user_question;
|
||||||
@ -188,4 +183,3 @@ id | user_id | type | current_question_id
|
|||||||
|
|
||||||
- 模型定义:`internal/models/practice_progress.go`
|
- 模型定义:`internal/models/practice_progress.go`
|
||||||
- 写入逻辑:`internal/handlers/practice_handler.go:356-387`
|
- 写入逻辑:`internal/handlers/practice_handler.go:356-387`
|
||||||
- SQL 修复脚本:`scripts/fix_practice_progress_index.sql`
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user