// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.

package model

import (
	"time"
)

const TableNameComment = "comment"

// Comment mapped from table <comment>
type Comment struct {
	ID            int64     `gorm:"column:id;type:bigint;primaryKey" json:"id"`
	VideoID       int64     `gorm:"column:video_id;type:bigint;not null;index:video_id_idx,priority:1" json:"video_id"`
	UserID        int64     `gorm:"column:user_id;type:bigint;not null;index:user_id_idx,priority:1;comment:发表评论的用户id" json:"user_id"` // 发表评论的用户id
	ParentID      *int64    `gorm:"column:parent_id;type:bigint;comment:父评论id" json:"parent_id"`                                       // 父评论id
	ToUserID      *int64    `gorm:"column:to_user_id;type:bigint;comment:评论所回复的用户id" json:"to_user_id"`                                // 评论所回复的用户id
	Content       string    `gorm:"column:content;type:varchar(512);not null;comment:评论内容" json:"content"`                             // 评论内容
	FirstComments string    `gorm:"column:first_comments;type:json;not null;comment:最开始的x条子评论" json:"first_comments"`                  // 最开始的x条子评论
	IsDeleted     bool      `gorm:"column:is_deleted;type:tinyint(1);not null;index:user_id_idx,priority:2;index:video_id_idx,priority:2" json:"is_deleted"`
	CreateTime    time.Time `gorm:"column:create_time;type:timestamp;not null;index:create_time_idx,priority:1;default:CURRENT_TIMESTAMP" json:"create_time"`
	UpdateTime    time.Time `gorm:"column:update_time;type:timestamp;not null;index:update_time_idx,priority:1;default:CURRENT_TIMESTAMP" json:"update_time"`
}

// TableName Comment's table name
func (*Comment) TableName() string {
	return TableNameComment
}
