Files
Go-Web-Template/server/model/system/sys_param_change_log.go
2026-04-23 15:29:07 +08:00

26 lines
1.0 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package system
import "time"
type SysParamChangeAction string
const (
SysParamChangeActionCreate SysParamChangeAction = "create"
SysParamChangeActionUpdate SysParamChangeAction = "update"
SysParamChangeActionDelete SysParamChangeAction = "delete"
)
// SysParamChangeLog 参数变更审计(策略/开关等都落在 sys_params
type SysParamChangeLog struct {
ID uint `json:"id" gorm:"primaryKey"`
ParamID uint `json:"paramId" gorm:"index;not null"`
Key string `json:"key" gorm:"index;size:191;not null"`
Action SysParamChangeAction `json:"action" gorm:"type:varchar(16);index;not null"`
OldValue string `json:"oldValue" gorm:"type:text"`
NewValue string `json:"newValue" gorm:"type:text"`
OperatorUserID uint `json:"operatorUserId" gorm:"index;not null"`
CreatedAt time.Time `json:"createdAt" gorm:"index"`
}
func (SysParamChangeLog) TableName() string { return "sys_param_change_logs" }