fix products listing
This commit is contained in:
@@ -30,30 +30,30 @@ type ProductRow struct {
|
||||
}
|
||||
|
||||
type MeiliSearchProduct struct {
|
||||
ProductID uint `gorm:"column:id_product" json:"product_id"`
|
||||
Name string `gorm:"column:name" json:"name"`
|
||||
Active uint8 `gorm:"column:active" json:"active"`
|
||||
Description string `gorm:"column:description" json:"description"`
|
||||
DescriptionShort string `gorm:"column:description_short" json:"description_short"`
|
||||
Usage string `gorm:"column:used_for" json:"usage"`
|
||||
EAN13 string `gorm:"column:ean13" json:"ean13"`
|
||||
Reference string `gorm:"column:reference" json:"reference"`
|
||||
Price float64 `gorm:"column:price" json:"price"`
|
||||
CategoryID uint `gorm:"column:id_category" json:"category_id"`
|
||||
CategoryName string `gorm:"column:category_name" json:"category_name"`
|
||||
Variations uint `gorm:"column:variations" json:"variations"`
|
||||
ProductID uint `gorm:"column:id_product" json:"product_id"`
|
||||
Name string `gorm:"column:name" json:"name"`
|
||||
// Active uint8 `gorm:"column:active" json:"active"`
|
||||
// Description string `gorm:"column:description" json:"description"`
|
||||
Description string `gorm:"column:description" json:"description"`
|
||||
// Usage string `gorm:"column:used_for" json:"usage"`
|
||||
EAN13 string `gorm:"column:ean13" json:"ean13"`
|
||||
Reference string `gorm:"column:reference" json:"reference"`
|
||||
Price float64 `gorm:"column:price" json:"price"`
|
||||
CategoryID uint `gorm:"column:id_category" json:"category_id"`
|
||||
CatName string `gorm:"column:cat_name" json:"cat_name"`
|
||||
LRew string `gorm:"column:l_rew" json:"l_rew"`
|
||||
|
||||
// JSON fields stored as raw, converted to string for search
|
||||
Attributes json.RawMessage `gorm:"column:attributes" json:"attributes"`
|
||||
Features json.RawMessage `gorm:"column:features" json:"features"`
|
||||
AttributeFilters json.RawMessage `gorm:"column:attribute_filters" json:"attribute_filters"`
|
||||
Attr json.RawMessage `gorm:"column:attr" json:"attr"`
|
||||
// AttributeFilters json.RawMessage `gorm:"column:attribute_filters" json:"attribute_filters"`
|
||||
Feat json.RawMessage `gorm:"column:feat" json:"feat"`
|
||||
|
||||
// String versions for searchable text (populated during indexing)
|
||||
FeaturesStr string `json:"features_str"`
|
||||
AttributesStr string `json:"attributes_str"`
|
||||
AttributeFiltersStr string `json:"attribute_filters_str"`
|
||||
FeaturesStr string `gorm:"-" json:"features_str"`
|
||||
AttributesStr string `gorm:"-" json:"attributes_str"`
|
||||
AttributeFiltersStr string `gorm:"-" json:"attribute_filters_str"`
|
||||
|
||||
CategoryIDs json.RawMessage `gorm:"column:category_ids" json:"category_ids"` // All category IDs including children for filtering
|
||||
IDImage uint `gorm:"column:id_image" json:"id_image"` // Cover image ID (not indexed)
|
||||
CoverImage string `json:"cover_image"` // Cover image URL (populated during indexing)
|
||||
CategoryIDs json.RawMessage `gorm:"column:category_ids" json:"category_ids"` // All category IDs including children for filtering
|
||||
Variations uint `gorm:"column:variations" json:"variations"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user