1234567891011121314151617181920212223242526272829303132333435363738 |
- package model
- import (
- "go.mongodb.org/mongo-driver/bson/primitive"
- "time"
- )
- type Tcpforwarding struct {
- Id int `gorm:"primary"`
- HostId int `gorm:"not null"`
- CdnWebId int `gorm:"not null"`
- Port string `gorm:"not null"`
- Comment string `gorm:"null"`
- Proxy bool `gorm:"not null"`
- CreatedAt time.Time
- UpdatedAt time.Time
- }
- func (m *Tcpforwarding) TableName() string {
- return "shd_waf_tcp"
- }
- type TcpForwardingRule struct {
- ID primitive.ObjectID `bson:"_id,omitempty"`
- Uid int `bson:"uid" json:"uid"`
- HostId int `bson:"host_id" json:"host_id"`
- TcpId int `bson:"tcp_id" json:"tcp_id"`
- CdnOriginIds map[string]int64 `bson:"cdn_origin_ids" json:"cdn_origin_ids"`
- BackendList []string `bson:"backend_list" json:"backend_list"`
- CreatedAt time.Time `bson:"created_at" json:"created_at"`
- UpdatedAt time.Time `bson:"updated_at" json:"updated_at"`
- }
- func (m *TcpForwardingRule) CollectionName() string {
- return "tcp_forwarding_rules"
- }
|