product

package
v0.0.0-...-3321fbd Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	ID   uuid.UUID `gorm:"type:uuid;primary_key"`
	Name *string   `gorm:"uniqueIndex"`
}

func (*Category) BeforeCreate

func (c *Category) BeforeCreate(tx *gorm.DB) (err error)

type Product

type Product struct {
	ID         uuid.UUID `gorm:"type:uuid;primary_key;"`
	Title      *string
	CategoryID *uuid.UUID
	Category   *Category
	Price      *float64
	Visible    *bool
	CreatedAt  *time.Time
	UpdatedAt  *time.Time
}

func (*Product) BeforeCreate

func (p *Product) BeforeCreate(tx *gorm.DB) (err error)

func (*Product) GetParameters

func (p *Product) GetParameters(db *gorm.DB) []*ProductParameters

type ProductParameters

type ProductParameters struct {
	ID        uuid.UUID `gorm:"type:uuid;primary_key;"`
	ProductID uuid.UUID
	Product   Product
	Name      *string
	Value     *string
	CreatedAt *time.Time
	UpdatedAt *time.Time
}

func (*ProductParameters) BeforeCreate

func (p *ProductParameters) BeforeCreate(tx *gorm.DB) (err error)

Jump to

Keyboard shortcuts

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