feat: 添加Neo4j图数据库支持及前端代码重构

- 新增 Neo4j 图数据库 handler、service、model
- 后端添加 SaveGraph API 接口
- 前端 Database.vue 重构,拆分为独立组件
- 新增 web/src/views/database/ 组件目录
- 删除临时文件 (temp_*.go)
- 添加 Neo4j 相关 API 需求文档

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-07 09:11:08 +08:00
parent 20015dbd2a
commit c917d6b04c
41 changed files with 4453 additions and 1021 deletions

View File

@@ -41,6 +41,11 @@ func (r *DatabaseRepository) Update(id string, info *model.DatabaseInfo) error {
return r.db.Model(&model.DatabaseInfo{}).Where("id = ?", id).Updates(info).Error
}
// UpdateFields 更新指定字段
func (r *DatabaseRepository) UpdateFields(id string, fields map[string]interface{}) error {
return r.db.Model(&model.DatabaseInfo{}).Where("id = ?", id).Updates(fields).Error
}
// Delete 删除
func (r *DatabaseRepository) Delete(id string) error {
return r.db.Delete(&model.DatabaseInfo{}, "id = ?", id).Error