package
Version:
v0.0.0-...-8f657ed
Opens a new window with list of versions in this module.
Published: Sep 25, 2022
License: GPL-3.0
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Product struct {
ID int64 `gorm:"primary_key;not_null;auto_increment" json:"id"`
ProductName string `json:"product_name"`
ProductSku string `gorm:"unique_index:not_null" json:"product_sku"`
ProductPrice float64 `json:"product_price"`
ProductDescription string `json:"product_description"`
ProductImage []ProductImage `gorm:"ForeignKey:ImageProductID" json:"product_image"`
ProductSize []ProductSize `gorm:"ForeignKey:SizeProductID" json:"product_size"`
ProductSeo ProductSeo `gorm:"ForeignKey:SeoProductID" json:"product_seo"`
}
type ProductImage struct {
ID int64 `gorm:"primary_key;not_null;auto_increment" json:"id"`
ImageName string `json:"image_name"`
ImageCode string `gorm:"unique_index;not_null" json:"image_code"`
ImageUrl string `json:"image_url"`
ImageProductID int64 `json:"image_product_id"`
}
type ProductSeo struct {
ID int64 `gorm:"primary_key;not_null;auto_increment" json:"id"`
SeoTitle string `json:"seo_title"`
SeoKeywords string `json:"seo_keywords"`
SeoDescription string `json:"seo_description"`
SeoCode string `json:"seo_code"`
SeoProductID int64 `json:"seo_product_id"`
}
type ProductSize struct {
ID int64 `gorm:"primary_key;not_null;auto_increment" json:"id"`
SizeName string `json:"size_name"`
SizeCode string `gorm:"unique_index;not_null" json:"size_code"`
SizeProductID int64 `json:"size_product_id"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.