/**
 * @Author: david.yan@qq.com
 * @Date: 2021-11-29 15:16:26
 * @LastEditors: david.yan@qq.com
 * @LastEditTime: 2021-11-30 17:40:50
 * @FilePath: /src/git.buka.tv/Cms/internal/models/category.go
 */
package models

import (
	"git.apinb.com/bsm-sdk/core/database"
	"git.apinb.com/bsm-sdk/core/types"
	"gorm.io/gorm"
)

// 内容标签
type CmsTags struct {
	gorm.Model
	types.Std_Identity
	SiteIdentity string `gorm:"column:site_identity;type:varchar(36);index;" json:"site_identity"`
	Title        string `gorm:"column:title;type:varchar(255);not null" json:"title"`             // 标题
	CoverPath    string `gorm:"column:cover_path;type:varchar(255);default:''" json:"cover_path"` // 封面
	Intro        string // 介绍
}

func init() {
	database.MigrateTables = append(database.MigrateTables, &CmsTags{})
}

// TableName .CmsTags 内容标签表
func (c *CmsTags) TableName() string {
	return "cms_tags" // 对应数据库表名
}
