add
This commit is contained in:
@@ -21,7 +21,6 @@ func ProcessYYSYK9R4Request(ctx context.Context, params []byte, deps *processors
|
||||
return nil, errors.Join(processors.ErrInvalidParam, err)
|
||||
}
|
||||
|
||||
// 构建数据宝入参:姓名、身份证、手机号、银行卡号(sign 外的业务参数可按需 AES 加密后作为 bodyData)
|
||||
reqParams := map[string]interface{}{
|
||||
"key": "c115708d915451da8f34a23e144dda6b",
|
||||
"name": paramsDto.Name,
|
||||
|
||||
21
internal/domains/security/entities/suspicious_ip_record.go
Normal file
21
internal/domains/security/entities/suspicious_ip_record.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package entities
|
||||
|
||||
import "time"
|
||||
|
||||
// SuspiciousIPRecord 可疑IP请求记录
|
||||
type SuspiciousIPRecord struct {
|
||||
ID uint64 `gorm:"primaryKey;autoIncrement" json:"id"`
|
||||
IP string `gorm:"type:varchar(64);not null;index:idx_ip_created,priority:1" json:"ip"`
|
||||
Path string `gorm:"type:varchar(255);not null;index:idx_path_created,priority:1" json:"path"`
|
||||
Method string `gorm:"type:varchar(16);not null;default:GET" json:"method"`
|
||||
RequestCount int `gorm:"not null;default:1" json:"request_count"`
|
||||
WindowSeconds int `gorm:"not null;default:10" json:"window_seconds"`
|
||||
TriggerReason string `gorm:"type:varchar(64);not null;default:rate_limit" json:"trigger_reason"`
|
||||
UserAgent string `gorm:"type:varchar(512);not null;default:''" json:"user_agent"`
|
||||
CreatedAt time.Time `gorm:"autoCreateTime;index:idx_ip_created,priority:2;index:idx_path_created,priority:2;index:idx_created" json:"created_at"`
|
||||
}
|
||||
|
||||
// TableName 指定表名
|
||||
func (SuspiciousIPRecord) TableName() string {
|
||||
return "suspicious_ip_records"
|
||||
}
|
||||
Reference in New Issue
Block a user