repository

package
v0.0.0-...-1070708 Latest Latest
Warning

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

Go to latest
Published: May 21, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDB

func InitDB() *gorm.DB

Types

type Account

type Account struct {
	Id        uint64 `gorm:"primary_key"`
	Name      string `gorm:"index:idx_name,unique"`
	Password  string
	CreatedAt time.Time
}

type Comment

type Comment struct {
	Id        uint64 `gorm:"primary_key"`
	UserId    uint64 `gorm:"index:idx_user_id"`
	VideoId   uint64 `gorm:"index:idx_video_id"`
	Content   string
	CreatedAt time.Time `gorm:"index:idx_created_at"`
}

type Favorite

type Favorite struct {
	UserId    uint64    `gorm:"index:idx_user_id"`
	VideoId   uint64    `gorm:"index:idx_video_id"`
	CreatedAt time.Time `gorm:"index:idx_created_at"`
}

type Follow

type Follow struct {
	UserId    uint64    `gorm:"index:idx_user_id"`
	ToUserId  uint64    `gorm:"index:idx_to_user_id"`
	CreatedAt time.Time `gorm:"index:idx_created_at"`
}

type Video

type Video struct {
	Id        uint64 `gorm:"primary_key"`
	UserId    uint64
	ObjectId  string
	Title     string
	CreatedAt time.Time `gorm:"index:idx_created_at"`
}

Jump to

Keyboard shortcuts

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