model

package
v0.0.0-...-8f657ed Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2022 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Product

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

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

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

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL