feat: Phase 1 — 项目骨架搭建,集成 Gin、SQLite 和设置页面

This commit is contained in:
2026-06-18 22:48:16 +08:00
parent 46f1bbf0f1
commit 1e9b1a2129
26 changed files with 2518 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
package handlers
import (
"database/sql"
"net/http"
"github.com/gin-gonic/gin"
)
type ReviewHandler struct {
db *sql.DB
}
func NewReviewHandler(db *sql.DB) *ReviewHandler {
return &ReviewHandler{db: db}
}
// Review handles POST /api/repos/:id/review — stub for Phase 4
func (h *ReviewHandler) Review(c *gin.Context) {
c.JSON(http.StatusNotImplemented, gin.H{"error": "review not implemented yet — coming in Phase 4"})
}
// SaveNotes handles POST /api/repos/:id/review/notes — stub for Phase 5
func (h *ReviewHandler) SaveNotes(c *gin.Context) {
c.JSON(http.StatusNotImplemented, gin.H{"error": "notes not implemented yet — coming in Phase 5"})
}
// GetNotes handles GET /api/repos/:id/review/notes — stub for Phase 5
func (h *ReviewHandler) GetNotes(c *gin.Context) {
c.JSON(http.StatusNotImplemented, gin.H{"error": "notes not implemented yet — coming in Phase 5"})
}
// GeneratePDF handles POST /api/repos/:id/review/pdf — stub for Phase 5
func (h *ReviewHandler) GeneratePDF(c *gin.Context) {
c.JSON(http.StatusNotImplemented, gin.H{"error": "pdf not implemented yet — coming in Phase 5"})
}