models

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

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

Go to latest
Published: Oct 31, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

DB 数据库实例

Functions

func ConnectDatabase

func ConnectDatabase()

ConnectDatabase 连接数据库

Types

type Book

type Book struct {
	ID     uint   `json:"id" gorm:"primaryKey`
	Title  string `json:"title"`
	Author string `json:"author"`
}

Book book的模型

Jump to

Keyboard shortcuts

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