model

package
v0.0.0-...-48d44df Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameFavorite = "favorites"

Variables

This section is empty.

Functions

This section is empty.

Types

type Favorite

type Favorite struct {
	ID        int64          `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"` // 主键ID
	UserID    int64          `gorm:"column:user_id" json:"user_id"`                     // 用户ID
	VideoID   int64          `gorm:"column:video_id" json:"video_id"`                   // 视频ID
	CreatedAt time.Time      `gorm:"column:created_at;default:CURRENT_TIMESTAMP" json:"created_at"`
	UpdatedAt time.Time      `gorm:"column:updated_at;default:CURRENT_TIMESTAMP" json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"`
}

Favorite mapped from table <favorites>

func (*Favorite) TableName

func (*Favorite) TableName() string

TableName Favorite's table name

Jump to

Keyboard shortcuts

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