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 TableNameComment = "comments"

Variables

This section is empty.

Functions

This section is empty.

Types

type Comment

type Comment struct {
	ID          int64          `gorm:"column:id;primaryKey" json:"id"`          // 主键ID
	UserID      int64          `gorm:"column:user_id" json:"user_id"`           // 用户ID
	VideoID     int64          `gorm:"column:video_id" json:"video_id"`         // 视频ID
	CommentText string         `gorm:"column:comment_text" json:"comment_text"` // 评论内容
	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"`
}

Comment mapped from table <comments>

func (*Comment) TableName

func (*Comment) TableName() string

TableName Comment's table name

Jump to

Keyboard shortcuts

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