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 Comment

type Comment struct {
	gorm.Model
	Video_id     int64  `json:"video_id" gorm:"index;not null" `
	Comment_text string `json:"comment_text" gorm:"type:varchar(255);not null"`
	User_id      int64  `json:"user_id" gorm:"not null" `
}

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

func (*Comment) TableName

func (u *Comment) TableName() string

Jump to

Keyboard shortcuts

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