2023-06-12 08:47:48 +00:00
|
|
|
|
package gmodel
|
2023-06-12 06:05:35 +00:00
|
|
|
|
|
2023-06-12 08:47:48 +00:00
|
|
|
|
import (
|
|
|
|
|
"database/sql"
|
|
|
|
|
"gorm.io/gorm"
|
|
|
|
|
)
|
2023-06-12 06:05:35 +00:00
|
|
|
|
|
|
|
|
|
type FsFaq struct {
|
|
|
|
|
Id int64 `gorm:"primary_key" json:"id"`
|
|
|
|
|
TagId *int64 `gorm:"default:0" json:"tag_id"` // 分类ID
|
|
|
|
|
TagName *string `gorm:"default:''" json:"tag_name"` // 分类名称
|
|
|
|
|
Title *string `gorm:"default:''" json:"title"` // 标题
|
|
|
|
|
Content *string `gorm:"default:''" json:"content"` // 内容
|
|
|
|
|
Status *int64 `gorm:"default:1" json:"status"` // 状态(0:禁用,1:启用)
|
|
|
|
|
Sort *int64 `gorm:"default:0" json:"sort"` // 排序
|
|
|
|
|
Ctime *sql.NullInt64 `gorm:"default:0" json:"ctime"` // 添加时间
|
|
|
|
|
}
|
2023-06-12 08:47:48 +00:00
|
|
|
|
type FsFaqModel struct {
|
|
|
|
|
db *gorm.DB
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewFsFaqModel(db *gorm.DB) *FsFaqModel {
|
|
|
|
|
return &FsFaqModel{db}
|
|
|
|
|
}
|