model

package
v0.0.0-...-f7771fc Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Db *gorm.DB

Functions

func InitDB

func InitDB(dbName string) error

Types

type Model

type Model struct {
	ID        int          `gorm:"primary_key" json:"id"`
	CreatedAt tools.MyTime `json:"created_at"`
	UpdatedAt tools.MyTime `json:"updated_at"`
}

Model base model

type User

type User struct {
	Model
	Nickname string `json:"nickname"`
}

Jump to

Keyboard shortcuts

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