feat: backend core - auth, user, role, permission, device, webhook, monitoring, cache, repository, service, middleware, API handlers
2026-04-02 11:19:50 +08:00
|
|
|
|
package domain
|
|
|
|
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
|
|
|
|
// ThemeConfig 主题配置
|
|
|
|
|
|
type ThemeConfig struct {
|
test: add comprehensive test coverage and improve code quality
- Add new test files for auth, service, and handler modules
- Improve test organization and coverage
- Refactor code for better maintainability
- Add captcha, settings, stats, and theme handler tests
- Add auth module tests (CAS, OAuth, password, SSO, state)
- Add service layer tests for auth, export, permissions, roles
- All Go tests pass (exit code 0)
- All frontend tests pass (325 tests in 59 files)
2026-04-17 20:43:50 +08:00
|
|
|
|
ID int64 `gorm:"primaryKey;autoIncrement" json:"id"`
|
|
|
|
|
|
Name string `gorm:"type:varchar(50);uniqueIndex;not null" json:"name"` // 主题名称
|
|
|
|
|
|
IsDefault bool `gorm:"default:false" json:"is_default"` // 是否默认主题
|
|
|
|
|
|
LogoURL string `gorm:"type:varchar(500)" json:"logo_url"` // Logo URL
|
|
|
|
|
|
FaviconURL string `gorm:"type:varchar(500)" json:"favicon_url"` // Favicon URL
|
|
|
|
|
|
PrimaryColor string `gorm:"type:varchar(20)" json:"primary_color"` // 主色调(如 #1890ff)
|
|
|
|
|
|
SecondaryColor string `gorm:"type:varchar(20)" json:"secondary_color"` // 辅助色
|
|
|
|
|
|
BackgroundColor string `gorm:"type:varchar(20)" json:"background_color"` // 背景色
|
|
|
|
|
|
TextColor string `gorm:"type:varchar(20)" json:"text_color"` // 文字颜色
|
|
|
|
|
|
CustomCSS string `gorm:"type:text" json:"custom_css"` // 自定义CSS
|
|
|
|
|
|
CustomJS string `gorm:"type:text" json:"custom_js"` // 自定义JS
|
|
|
|
|
|
Enabled bool `gorm:"default:true" json:"enabled"` // 是否启用
|
|
|
|
|
|
CreatedAt time.Time `gorm:"autoCreateTime" json:"created_at"`
|
|
|
|
|
|
UpdatedAt time.Time `gorm:"autoUpdateTime" json:"updated_at"`
|
feat: backend core - auth, user, role, permission, device, webhook, monitoring, cache, repository, service, middleware, API handlers
2026-04-02 11:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// TableName 指定表名
|
|
|
|
|
|
func (ThemeConfig) TableName() string {
|
|
|
|
|
|
return "theme_configs"
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// DefaultThemeConfig 返回默认主题配置
|
|
|
|
|
|
func DefaultThemeConfig() *ThemeConfig {
|
|
|
|
|
|
return &ThemeConfig{
|
test: add comprehensive test coverage and improve code quality
- Add new test files for auth, service, and handler modules
- Improve test organization and coverage
- Refactor code for better maintainability
- Add captcha, settings, stats, and theme handler tests
- Add auth module tests (CAS, OAuth, password, SSO, state)
- Add service layer tests for auth, export, permissions, roles
- All Go tests pass (exit code 0)
- All frontend tests pass (325 tests in 59 files)
2026-04-17 20:43:50 +08:00
|
|
|
|
Name: "default",
|
|
|
|
|
|
IsDefault: true,
|
|
|
|
|
|
PrimaryColor: "#1890ff",
|
|
|
|
|
|
SecondaryColor: "#52c41a",
|
feat: backend core - auth, user, role, permission, device, webhook, monitoring, cache, repository, service, middleware, API handlers
2026-04-02 11:19:50 +08:00
|
|
|
|
BackgroundColor: "#ffffff",
|
test: add comprehensive test coverage and improve code quality
- Add new test files for auth, service, and handler modules
- Improve test organization and coverage
- Refactor code for better maintainability
- Add captcha, settings, stats, and theme handler tests
- Add auth module tests (CAS, OAuth, password, SSO, state)
- Add service layer tests for auth, export, permissions, roles
- All Go tests pass (exit code 0)
- All frontend tests pass (325 tests in 59 files)
2026-04-17 20:43:50 +08:00
|
|
|
|
TextColor: "#333333",
|
|
|
|
|
|
Enabled: true,
|
feat: backend core - auth, user, role, permission, device, webhook, monitoring, cache, repository, service, middleware, API handlers
2026-04-02 11:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|