database

package
v0.0.0-...-dc79853 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Instance *gorm.DB

Functions

func Initialize

func Initialize(connectionString string) error

func Migrate

func Migrate()

Types

type Author

type Author struct {
	ID        string `gorm:"primaryKey"`
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt gorm.DeletedAt `gorm:"index"`
	Quotes    []*Quote       `gorm:"many2many:quote_authors;"`
}

type Quote

type Quote struct {
	Meta    gorm.Model `gorm:"embedded"`
	Text    string
	Authors []*Author `gorm:"many2many:quote_authors;"`
	Source  *string
}

Jump to

Keyboard shortcuts

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