Commit 1fd0a160 authored by qiuqunfeng's avatar qiuqunfeng
Browse files

commit

parent f8f6b0d9
...@@ -2,14 +2,12 @@ ...@@ -2,14 +2,12 @@
CREATE TABLE waf_services ( CREATE TABLE waf_services (
id SERIAL PRIMARY KEY, id SERIAL PRIMARY KEY,
gateway_name VARCHAR(255) NOT NULL, gateway_name VARCHAR(255) NOT NULL,
port INTEGER NOT NULL,
namespace VARCHAR(255) NOT NULL, namespace VARCHAR(255) NOT NULL,
region_code VARCHAR(50) NOT NULL, region_code VARCHAR(50) NOT NULL,
host TEXT NOT NULL, -- Stored as comma-separated string
mode VARCHAR(50) NOT NULL, mode VARCHAR(50) NOT NULL,
rule_num INTEGER DEFAULT 0, rule_num INTEGER DEFAULT 0,
attack_num INTEGER DEFAULT 0, attack_num INTEGER DEFAULT 0,
rule_category_status JSON NOT NULL rule_category_status JSON
); );
-- Create waf_rules table -- Create waf_rules table
......
...@@ -43,10 +43,8 @@ func (r *RuleCategoryStatusList) Scan(src interface{}) error { ...@@ -43,10 +43,8 @@ func (r *RuleCategoryStatusList) Scan(src interface{}) error {
type WafService struct { type WafService struct {
ID uint `gorm:"column:id;primaryKey;autoIncrement"` ID uint `gorm:"column:id;primaryKey;autoIncrement"`
GatewayName string `gorm:"column:gateway_name"` GatewayName string `gorm:"column:gateway_name"`
Port int `gorm:"column:port"`
Namespace string `gorm:"column:namespace"` Namespace string `gorm:"column:namespace"`
RegionCode string `gorm:"column:region_code"` RegionCode string `gorm:"column:region_code"`
Host HostList `gorm:"column:host"`
Mode string `gorm:"column:mode"` Mode string `gorm:"column:mode"`
RuleNum int `gorm:"column:rule_num"` RuleNum int `gorm:"column:rule_num"`
AttackNum int `gorm:"column:attack_num"` AttackNum int `gorm:"column:attack_num"`
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment