This commit is contained in:
2026-09-14 08:52:52 +02:00
parent d1e210d03e
commit c62aa67220
9 changed files with 143 additions and 20 deletions
@@ -0,0 +1,22 @@
package handlers
import (
"net/http"
"xcpq_editor/internal/models"
"github.com/gin-gonic/gin"
)
func ImportHandler_PropertyTypesGroup(ctx *gin.Context) {
// Handle the import request here
var importData []models.Property_Types_Group
if err := ctx.ShouldBindJSON(&importData); err != nil {
ctx.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
return
}
ctx.JSON(http.StatusOK, gin.H{
"message": "Import successful",
})
}
@@ -1,10 +1,10 @@
package models
type Property struct {
Id int
Name string
Description string
Image_Url string
Parent_Property *Property
Values []Value
Id int `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Image_Url string `json:"image_url,omitempty"`
Parent_Property *Property `json:"parent_property,omitempty"`
Values []Value `json:"values,omitempty"`
}
@@ -1,9 +1,9 @@
package models
type Property_Type struct {
Id int
Name string
Description string
Image_Url string
Property Property
Id int `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Image_Url string `json:"image_url,omitempty"`
Property Property `json:"property,omitempty"`
}
@@ -1,10 +1,10 @@
package models
type Property_Types_Group struct {
Id int
Name string
Description string
Image_Url string
Property_Types []Property_Type
Property_Types_Groups []Property_Types_Group
Id int `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Image_Url string `json:"image_url,omitempty"`
Property_Types []Property_Type `json:"property_types,omitempty"`
Property_Types_Groups []Property_Types_Group `json:"property_types_groups,omitempty"`
}
@@ -1,7 +1,7 @@
package models
type Value struct {
Id int
Value string
Image_Url string
Id int `json:"id"`
Value string `json:"value"`
Image_Url string `json:"image_url,omitempty"`
}