Skip to content

Commit

Permalink
refactor: remove unsed sql
Browse files Browse the repository at this point in the history
  • Loading branch information
roryye committed Aug 12, 2024
1 parent d23ccd4 commit 9d6ca26
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 323 deletions.
9 changes: 0 additions & 9 deletions server/controller/cloud/common/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,6 @@ const (
CLOUD_SYNC_TIMER_MAX = 86400
)

const (
SECURITY_GROUP_RULE_ACCEPT = 1
SECURITY_GROUP_RULE_DROP = 2
SECURITY_GROUP_RULE_INGRESS = 1
SECURITY_GROUP_RULE_EGRESS = 2
SECURITY_GROUP_IPV4 = 1
SECURITY_GROUP_IPV6 = 2
)

const (
PORT_RANGE_ALL = "0-65535"
PROTOCOL_ALL = "ALL"
Expand Down
16 changes: 0 additions & 16 deletions server/controller/common/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,22 +430,6 @@ const (
CONTACT_CREATE_METHOD_LEARN = 1 // TODO 修改与其他统一
)

const (
SECURITY_GROUP_RULE_UNKNOWN = 0
SECURITY_GROUP_RULE_ACCEPT = 1
SECURITY_GROUP_RULE_DROP = 2

SECURITY_GROUP_RULE_INGRESS = 1
SECURITY_GROUP_RULE_EGRESS = 2

SECURITY_GROUP_IP_TYPE_UNKNOWN = 0
SECURITY_GROUP_RULE_IPV4 = 1
SECURITY_GROUP_RULE_IPV6 = 2

SECURITY_GROUP_RULE_IPV4_CIDR = "0.0.0.0/0"
SECURITY_GROUP_RULE_IPV6_CIDR = "::/0"
)

const (
ROUTING_TABLE_TYPE_VPN = "vpn"
ROUTING_TABLE_TYPE_LOCAL = "local"
Expand Down
3 changes: 0 additions & 3 deletions server/controller/common/resource_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ const (
RESOURCE_TYPE_WAN_IP_EN = "wan_ip"
RESOURCE_TYPE_LAN_IP_EN = "lan_ip"
RESOURCE_TYPE_FLOATING_IP_EN = "floating_ip"
RESOURCE_TYPE_SECURITY_GROUP_EN = "security_group"
RESOURCE_TYPE_SECURITY_GROUP_RULE_EN = "security_group_rule"
RESOURCE_TYPE_VM_SECURITY_GROUP_EN = "vm_security_group"
RESOURCE_TYPE_NAT_GATEWAY_EN = "nat_gateway"
RESOURCE_TYPE_NAT_RULE_EN = "nat_rule"
RESOURCE_TYPE_NAT_VM_CONNECTION_EN = "nat_vm_connection"
Expand Down
31 changes: 0 additions & 31 deletions server/controller/db/mysql/ch_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,37 +114,6 @@ type ChPodGroupPort struct {
PortPodServiceName string `gorm:"column:port_pod_service_name;type:varchar(256);default:null" json:"PORT_POD_SERVICE_NAME"`
}

type ChDevicePort struct {
DeviceType int `gorm:"primaryKey;column:devicetype;type:int;not null" json:"DEVICETYPE"`
DeviceID int `gorm:"primaryKey;column:deviceid;type:int;not null" json:"DEVICEID"`
Protocol int `gorm:"primaryKey;column:protocol;type:int;not null" json:"PROTOCOL"`
Port int `gorm:"primaryKey;column:port;type:int;not null" json:"PORT"`
PortLBID int `gorm:"column:port_lb_id;type:int;default:null" json:"PORT_LB_ID"`
PortLBName string `gorm:"column:port_lb_name;type:varchar(256);default:null" json:"PORT_LB_NAME"`
PortLBListenerID int `gorm:"column:port_lb_listener_id;type:int;default:null" json:"PORT_LB_LISTENER_ID"`
PortLBListenerName string `gorm:"column:port_lb_listener_name;type:varchar(256);default:null" json:"PORT_LB_LISTENER_NAME"`
PortPodServiceID int `gorm:"column:port_pod_service_id;type:int;default:null" json:"PORT_POD_SERVICE_ID"`
PortPodServiceName string `gorm:"column:port_pod_service_name;type:varchar(256);default:null" json:"PORT_POD_SERVICE_NAME"`
}

type ChIPPort struct {
IP string `gorm:"primaryKey;column:ip;type:varchar(64);not null" json:"IP"`
SubnetID int `gorm:"primaryKey;column:subnet_id;type:int;not null" json:"SUBNET_ID"`
Protocol int `gorm:"primaryKey;column:protocol;type:int;not null" json:"PROTOCOL"`
Port int `gorm:"primaryKey;column:port;type:int;not null" json:"PORT"`
PortLBID int `gorm:"column:port_lb_id;type:int;default:null" json:"PORT_LB_ID"`
PortLBName string `gorm:"column:port_lb_name;type:varchar(256);default:null" json:"PORT_LB_NAME"`
PortLBListenerID int `gorm:"column:port_lb_listener_id;type:int;default:null" json:"PORT_LB_LISTENER_ID"`
PortLBListenerName string `gorm:"column:port_lb_listener_name;type:varchar(256);default:null" json:"PORT_LB_LISTENER_NAME"`
PortPodServiceID int `gorm:"column:port_pod_service_id;type:int;default:null" json:"PORT_POD_SERVICE_ID"`
PortPodServiceName string `gorm:"column:port_pod_service_name;type:varchar(256);default:null" json:"PORT_POD_SERVICE_NAME"`
}

type ChServerPort struct {
ServerPort int `gorm:"primaryKey;column:server_port;type:int;not null" json:"SERVER_PORT"`
ServerPortName string `gorm:"column:server_port_name;type:varchar(256)" json:"SERVER_PORT_NAME"`
}

type ChIPRelation struct {
L3EPCID int `gorm:"primaryKey;column:l3_epc_id;type:int;not null" json:"L3_EPC_ID"`
IP string `gorm:"primaryKey;column:ip;type:varchar(64);not null" json:"IP"`
Expand Down
Loading

0 comments on commit 9d6ca26

Please sign in to comment.