// 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 TableNameFavorite = "favorite"

// Favorite mapped from table <favorite>
type Favorite struct {
	ID           int64     `gorm:"column:id;type:bigint;primaryKey" json:"id"`
	UserID       int64     `gorm:"column:user_id;type:bigint;not null;index:user_id_idx,priority:1" json:"user_id"`
	TargetType   int32     `gorm:"column:target_type;type:int;not null;index:user_id_idx,priority:3;comment:点赞对象类型 1-视频 2-评论" json:"target_type"`  // 点赞对象类型 1-视频 2-评论
	TargetID     int64     `gorm:"column:target_id;type:bigint;not null;index:user_id_idx,priority:2;comment:点赞对象id" json:"target_id"`             // 点赞对象id
	FavoriteType int32     `gorm:"column:favorite_type;type:int;not null;index:user_id_idx,priority:4;comment:点赞类型 1-点赞 2-踩" json:"favorite_type"` // 点赞类型 1-点赞 2-踩
	IsDeleted    bool      `gorm:"column:is_deleted;type:tinyint(1);not null;index:user_id_idx,priority:5" 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 Favorite's table name
func (*Favorite) TableName() string {
	return TableNameFavorite
}
