2025-12-20 09:30:16 +08:00
|
|
|
package models
|
|
|
|
|
|
|
|
|
|
import (
|
2026-01-18 17:31:04 +08:00
|
|
|
"github.com/engigu/baihu-panel/internal/constant"
|
2025-12-20 09:30:16 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// Setting 系统设置
|
|
|
|
|
type Setting struct {
|
2026-03-03 17:25:38 +08:00
|
|
|
ID string `json:"id" gorm:"primaryKey;size:20"`
|
2025-12-20 09:30:16 +08:00
|
|
|
Section string `json:"section" gorm:"size:50;not null;index:idx_section_key"`
|
2025-12-21 10:38:48 +08:00
|
|
|
Key string `json:"key" gorm:"size:100;not null;index:idx_section_key"`
|
2026-03-09 18:10:23 +08:00
|
|
|
Value BigText `json:"value"`
|
2025-12-20 09:30:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (Setting) TableName() string {
|
|
|
|
|
return constant.TablePrefix + "settings"
|
|
|
|
|
}
|