models

package
v0.0.0-...-c19fc54 Latest Latest
Warning

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

Go to latest
Published: May 18, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchConnection

func FetchConnection() *gorm.DB

Types

type Author

type Author struct {
	ID        int    `json:"id" gorm:"primary_key"`
	Firstname string `json:"firstname"`
	Lastname  string `json:"lastname"`
	BookID    int    `json:"bookID"`
}

type Book

type Book struct {
	ID       int    `json:"id" gorm:"primary_key"`
	Name     string `json:"name"`
	Category string `json:"category"`
	Author   []int  `json:"author" gorm:"polymorphic:Owner;"`
}

Jump to

Keyboard shortcuts

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