This commit is contained in:
@@ -2,8 +2,7 @@ package models
|
||||
|
||||
import "gorm.io/gorm"
|
||||
|
||||
// Option 对应 typecho_options 数据表
|
||||
// 用于存储系统配置项
|
||||
// Option 系统配置项模型
|
||||
type Option struct {
|
||||
Name string `gorm:"column:name;type:varchar(32);primaryKey"` // 配置名称(主键)
|
||||
Value string `gorm:"column:value;type:text"` // 配置值
|
||||
@@ -12,7 +11,7 @@ type Option struct {
|
||||
|
||||
// TableName 指定表名
|
||||
func (Option) TableName() string {
|
||||
return "typecho_options"
|
||||
return "options"
|
||||
}
|
||||
|
||||
// GetOptionValue 根据name和user获取配置值
|
||||
|
||||
Reference in New Issue
Block a user