models

package
v0.0.0-...-6fa2d18 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunMigrations

func RunMigrations()

Types

type Product

type Product struct {
	gorm.Model
	Code       string       `json:"code"`
	Price      uint         `json:"price"`
	Warehouses []*Warehouse `gorm:"many2many:inventory;" json:"warehouses"`
}

type Warehouse

type Warehouse struct {
	gorm.Model
	Address  string     `json:"address"`
	Workers  []Worker   `json:"workers"`
	Products []*Product `gorm:"many2many:inventory;" json:"products"`
}

type Worker

type Worker struct {
	gorm.Model
	Name        string `json:"name"`
	WarehouseID uint
}

Jump to

Keyboard shortcuts

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