feat: 完善平台总后台模块

This commit is contained in:
2026-07-27 00:18:42 +08:00
parent 073eb89762
commit 642980960e
197 changed files with 22356 additions and 1060 deletions

View File

@@ -0,0 +1,16 @@
package models
import "git.apinb.com/bsm-sdk/core/database"
// SafRule 对应 saf_rule保存安全规则。
type SafRule struct {
Entity
RuleCode string `gorm:"column:rule_code;type:varchar(64);not null;uniqueIndex" json:"rule_code"`
VersionNo int `gorm:"column:version_no;not null;default:1" json:"version_no"`
Threshold string `gorm:"column:threshold;type:jsonb;not null;default:'{}'" json:"threshold"`
Action string `gorm:"column:action;type:varchar(64);not null" json:"action"`
GrayScope string `gorm:"column:gray_scope;type:jsonb;not null;default:'{}'" json:"gray_scope"`
}
func init() { database.AppendMigrate(&SafRule{}) }
func (table *SafRule) TableName() string { return "saf_rule" }