model

package
v0.0.0-...-0c44e78 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 0 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          uint64 `gorm:"primaryKey"`
	Name        string `gorm:"type:varchar(256);not null"`
	Description string `gorm:"type:text;not null"`
	UpdatedAt   int64  `gorm:"autoUpdateTime:milli"`
	CreatedAt   int64  `gorm:"autoCreateTime:milli"`
}

type Idempotency

type Idempotency struct {
	ID         uint64 `gorm:"primaryKey"`
	ProductID  uint64 `gorm:"primaryKey"`
	Quantity   uint64 `gorm:"not null"`
	Rollbacked bool   `gorm:"not null"`
	CreatedAt  int64  `gorm:"autoCreateTime:milli"`
}

type Product

type Product struct {
	ID          uint64 `gorm:"primaryKey"`
	CategoryID  uint64
	Category    Category `gorm:"foreignKey:CategoryID"`
	Name        string   `gorm:"type:varchar(256);not null"`
	Description string   `gorm:"type:text;not null"`
	BrandName   string   `gorm:"type:varchar(256);not null"`
	Inventory   uint64   `gorm:"not null"`
	Price       uint64   `gorm:"not null"`
	UpdatedAt   int64    `gorm:"autoUpdateTime:milli"`
	CreatedAt   int64    `gorm:"autoCreateTime:milli"`
}

Jump to

Keyboard shortcuts

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