db

package
v0.0.0-...-7de97a6 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func Init

func Init()

初始化数据库

Types

type Follow

type Follow struct {
	gorm.Model
	UserID   int64 `json:"user_id" gorm:"not null;uniqueIndex:user_touser" `
	ToUserID int64 `json:"to_user_id" gorm:"not null;uniqueIndex:user_touser" `
}

用户数据库表结构--自动创建(关注、被关注)

func (*Follow) TableName

func (u *Follow) TableName() string

Jump to

Keyboard shortcuts

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