db

package
v0.0.0-...-816873c Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func GetWorkCountByUid

func GetWorkCountByUid(ctx context.Context, uid int64) (workCount int64, err error)

func Init

func Init()

Types

type Video

type Video struct {
	Id        int64  `json:"id"`
	UserID    int64  `json:"user_id"`
	PlayUrl   string `json:"play_url"`
	CoverUrl  string `json:"cover_url"`
	Title     string `json:"title"`
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt gorm.DeletedAt `gorm:"index"`
}

func CreateVideo

func CreateVideo(ctx context.Context, video *Video) (*Video, error)

func GetVideoByTimeUid

func GetVideoByTimeUid(ctx context.Context, lastTime string, uid int64) ([]Video, error)

func GetVideoByUid

func GetVideoByUid(ctx context.Context, uid int64) ([]Video, error)

func GetVideosByIDs

func GetVideosByIDs(ctx context.Context, ids []int64) ([]Video, error)

Jump to

Keyboard shortcuts

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