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)
This commit is contained in:
@@ -30,17 +30,17 @@ const (
|
||||
|
||||
// Webhook Webhook 配置
|
||||
type Webhook struct {
|
||||
ID int64 `gorm:"primaryKey;autoIncrement" json:"id"`
|
||||
Name string `gorm:"type:varchar(100);not null" json:"name"`
|
||||
URL string `gorm:"type:varchar(500);not null" json:"url"`
|
||||
Secret string `gorm:"type:varchar(255)" json:"-"` // HMAC 签名密钥,不返回给前端
|
||||
Events string `gorm:"type:text" json:"events"` // JSON 数组,订阅的事件类型
|
||||
Status WebhookStatus `gorm:"default:1" json:"status"`
|
||||
MaxRetries int `gorm:"default:3" json:"max_retries"`
|
||||
TimeoutSec int `gorm:"default:10" json:"timeout_sec"`
|
||||
CreatedBy int64 `gorm:"index" json:"created_by"`
|
||||
CreatedAt time.Time `gorm:"autoCreateTime" json:"created_at"`
|
||||
UpdatedAt time.Time `gorm:"autoUpdateTime" json:"updated_at"`
|
||||
ID int64 `gorm:"primaryKey;autoIncrement" json:"id"`
|
||||
Name string `gorm:"type:varchar(100);not null" json:"name"`
|
||||
URL string `gorm:"type:varchar(500);not null" json:"url"`
|
||||
Secret string `gorm:"type:varchar(255)" json:"-"` // HMAC 签名密钥,不返回给前端
|
||||
Events string `gorm:"type:text" json:"events"` // JSON 数组,订阅的事件类型
|
||||
Status WebhookStatus `gorm:"default:1" json:"status"`
|
||||
MaxRetries int `gorm:"default:3" json:"max_retries"`
|
||||
TimeoutSec int `gorm:"default:10" json:"timeout_sec"`
|
||||
CreatedBy int64 `gorm:"index" json:"created_by"`
|
||||
CreatedAt time.Time `gorm:"autoCreateTime" json:"created_at"`
|
||||
UpdatedAt time.Time `gorm:"autoUpdateTime" json:"updated_at"`
|
||||
}
|
||||
|
||||
// TableName 指定表名
|
||||
|
||||
Reference in New Issue
Block a user