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

commit

parent f8f6b0d9
......@@ -2,14 +2,12 @@
CREATE TABLE waf_services (
id SERIAL PRIMARY KEY,
gateway_name VARCHAR(255) NOT NULL,
port INTEGER NOT NULL,
namespace VARCHAR(255) NOT NULL,
region_code VARCHAR(50) NOT NULL,
host TEXT NOT NULL, -- Stored as comma-separated string
mode VARCHAR(50) NOT NULL,
rule_num INTEGER DEFAULT 0,
attack_num INTEGER DEFAULT 0,
rule_category_status JSON NOT NULL
rule_category_status JSON
);
-- Create waf_rules table
......
......@@ -43,10 +43,8 @@ func (r *RuleCategoryStatusList) Scan(src interface{}) error {
type WafService struct {
ID uint `gorm:"column:id;primaryKey;autoIncrement"`
GatewayName string `gorm:"column:gateway_name"`
Port int `gorm:"column:port"`
Namespace string `gorm:"column:namespace"`
RegionCode string `gorm:"column:region_code"`
Host HostList `gorm:"column:host"`
Mode string `gorm:"column:mode"`
RuleNum int `gorm:"column:rule_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