model

package
v0.0.0-...-aec1c34 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Merchant

type Merchant struct {
	ID      uuid.UUID `gorm:"primaryKey"`
	Name    string    `gorm:"unique"`
	AdminID uint      `json:"admin_id,omitempty"`
}

type Product

type Product struct {
	ID        uuid.UUID `gorm:"primaryKey"`
	CreatedAt time.Time `gorm:"autoCreateTime"`
	UpdatedAt time.Time `gorm:"autoUpdateTime"`

	// name and merchant_id are composite keys
	Name       string    `gorm:"primaryKey"`
	MerchantID uuid.UUID `gorm:"primaryKey"`
	Qty        int
	Price      float32
	Desc       string
}

type ReservedProduct

type ReservedProduct struct {
	OID uuid.UUID `gorm:"primaryKey"`
	PID uuid.UUID
	Qty int
}

Jump to

Keyboard shortcuts

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