style(core): align struct tags and fields

Standardize alignment of struct tags in models and field assignments in
services for better readability. Additionally, include the Binding model
in the test database auto-migration.
This commit is contained in:
zenfun
2025-12-17 00:51:02 +08:00
parent ed6446e586
commit 16fceec8e7
6 changed files with 43 additions and 45 deletions

View File

@@ -157,4 +157,3 @@ func (h *Handler) UpdateBinding(c *gin.Context) {
c.JSON(http.StatusOK, existing)
}

View File

@@ -28,7 +28,7 @@ func newTestHandler(t *testing.T) (*Handler, *gorm.DB) {
if err != nil {
t.Fatalf("open sqlite: %v", err)
}
if err := db.AutoMigrate(&model.Provider{}); err != nil {
if err := db.AutoMigrate(&model.Provider{}, &model.Binding{}); err != nil {
t.Fatalf("migrate: %v", err)
}

View File

@@ -10,4 +10,3 @@ type BindingDTO struct {
SelectorValue string `json:"selector_value"`
Status string `json:"status"`
}