db

package
v0.0.0-...-542fe02 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func CreateVideo

func CreateVideo(video *Video) (int64, error)

func Init

func Init()

Init init DB

Types

type Video

type Video struct {
	gorm.Model
	ID          int64
	AuthorID    int64
	PlayURL     string
	CoverURL    string
	PublishTime time.Time
	Title       string
}

func GetVideoByUserId

func GetVideoByUserId(user_id int64) ([]*Video, error)

func GetVideoListByVideoIDList

func GetVideoListByVideoIDList(videoIds []int64) ([]*Video, error)

func (Video) TableName

func (Video) TableName() string

Jump to

Keyboard shortcuts

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