Files
b2b/app/model/productDescription.go
2026-03-23 16:42:54 +01:00

45 lines
2.6 KiB
Go

package model
// ProductDescription contains all the information visible on webpage, in given language.
type ProductDescription struct {
ProductID uint `gorm:"column:id_product;primaryKey" json:"product_id" form:"product_id"`
ShopID uint `gorm:"column:id_shop;primaryKey" json:"shop_id" form:"shop_id"`
LangID uint `gorm:"column:id_lang;primaryKey" json:"lang_id" form:"lang_id"`
Description string `gorm:"column:description;type:text" json:"description" form:"description"`
DescriptionShort string `gorm:"column:description_short;type:text" json:"description_short" form:"description_short"`
LinkRewrite string `gorm:"column:link_rewrite;type:varchar(128)" json:"link_rewrite" form:"link_rewrite"`
MetaDescription string `gorm:"column:meta_description;type:varchar(512)" json:"meta_description" form:"meta_description"`
MetaKeywords string `gorm:"column:meta_keywords;type:varchar(255)" json:"meta_keywords" form:"meta_keywords"`
MetaTitle string `gorm:"column:meta_title;type:varchar(128)" json:"meta_title" form:"meta_title"`
Name string `gorm:"column:name;type:varchar(128)" json:"name" form:"name"`
AvailableNow string `gorm:"column:available_now;type:varchar(255)" json:"available_now" form:"available_now"`
AvailableLater string `gorm:"column:available_later;type:varchar(255)" json:"available_later" form:"available_later"`
DeliveryInStock string `gorm:"column:delivery_in_stock;type:varchar(255)" json:"delivery_in_stock" form:"delivery_in_stock"`
DeliveryOutStock string `gorm:"column:delivery_out_stock;type:varchar(255)" json:"delivery_out_stock" form:"delivery_out_stock"`
Usage string `gorm:"column:usage;type:text" json:"usage" form:"usage"`
}
type ProductRow struct {
IDProduct int `gorm:"column:id_product"`
IDShop int `gorm:"column:id_shop"`
Name string `gorm:"column:name"`
Active uint8 `gorm:"column:active"`
Reference string `gorm:"column:reference"`
}
type MeiliSearchProduct struct {
ProductID uint `gorm:"column:id_product"`
Name string `gorm:"column:name"`
Active uint8 `gorm:"column:active"`
Price float64 `gorm:"column:price"`
Description string `gorm:"column:description"`
DescriptionShort string `gorm:"column:description_short"`
Usage string `gorm:"column:usage"`
EAN13 string `gorm:"column:ean13"`
Reference string `gorm:"column:reference"`
Width float64 `gorm:"column:width"`
Height float64 `gorm:"column:height"`
Depth float64 `gorm:"column:depth"`
Weight float64 `gorm:"column:weight"`
}