使用qoder优化后更新
Some checks failed
Go build / build and run (push) Has been cancelled

This commit is contained in:
2026-02-12 13:48:35 +08:00
parent abd5962ae9
commit bc59f616fd
15 changed files with 130 additions and 278 deletions

View File

@@ -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获取配置值