models

package
v0.0.0-...-cd5d3d7 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseDB

func CloseDB()

CloseDB method

func ConnectDB

func ConnectDB() (db *gorm.DB, err error)

ConnectDB method

func MigrateDB

func MigrateDB() error

MigrateDB method

Types

type Category

type Category struct {
	gorm.Model
	UUID string `gorm:"primary_key" json:"id"`
	Name string `json:"name"`
}

Category model

func GetCategory

func GetCategory() Category

GetCategory method

type Product

type Product struct {
	gorm.Model
	Name  string
	Price string
}

Product model

type User

type User struct {
	gorm.Model
	Name      string
	Email     string
	Passwords string
}

Jump to

Keyboard shortcuts

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