package model import ( "time" ) type Plan struct { ID int `gorm:"primaryKey;column:id" json:"id"` GroupID *int `gorm:"column:group_id" json:"group_id"` TransferEnable *int `gorm:"column:transfer_enable" json:"transfer_enable"` Name string `gorm:"column:name" json:"name"` Reference *string `gorm:"column:reference" json:"reference"` SpeedLimit *int `gorm:"column:speed_limit" json:"speed_limit"` Show bool `gorm:"column:show" json:"show"` Sort *int `gorm:"column:sort" json:"sort"` Renew bool `gorm:"column:renew;default:1" json:"renew"` Content *string `gorm:"column:content" json:"content"` ResetTrafficMethod *int `gorm:"column:reset_traffic_method;default:0" json:"reset_traffic_method"` CapacityLimit *int `gorm:"column:capacity_limit;default:0" json:"capacity_limit"` Prices *string `gorm:"column:prices" json:"prices"` Sell bool `gorm:"column:sell" json:"sell"` DeviceLimit *int `gorm:"column:device_limit" json:"device_limit"` Tags *string `gorm:"column:tags" json:"tags"` CreatedAt int64 `gorm:"column:created_at" json:"created_at"` UpdatedAt int64 `gorm:"column:updated_at" json:"updated_at"` } func (Plan) TableName() string { return "v2_plan" } type Server struct { ID int `gorm:"primaryKey;column:id" json:"id"` Type string `gorm:"column:type" json:"type"` Code *string `gorm:"column:code" json:"code"` ParentID *int `gorm:"column:parent_id" json:"parent_id"` GroupIDs *string `gorm:"column:group_ids" json:"group_ids"` RouteIDs *string `gorm:"column:route_ids" json:"route_ids"` Name string `gorm:"column:name" json:"name"` Rate float32 `gorm:"column:rate" json:"rate"` TransferEnable *int64 `gorm:"column:transfer_enable" json:"transfer_enable"` U int64 `gorm:"column:u;default:0" json:"u"` D int64 `gorm:"column:d;default:0" json:"d"` Tags *string `gorm:"column:tags" json:"tags"` Host string `gorm:"column:host" json:"host"` Port string `gorm:"column:port" json:"port"` ServerPort int `gorm:"column:server_port" json:"server_port"` ProtocolSettings *string `gorm:"column:protocol_settings" json:"protocol_settings"` CustomOutbounds *string `gorm:"column:custom_outbounds" json:"custom_outbounds"` CustomRoutes *string `gorm:"column:custom_routes" json:"custom_routes"` CertConfig *string `gorm:"column:cert_config" json:"cert_config"` Show bool `gorm:"column:show" json:"show"` Sort *int `gorm:"column:sort" json:"sort"` RateTimeEnable bool `gorm:"column:rate_time_enable" json:"rate_time_enable"` RateTimeRanges *string `gorm:"column:rate_time_ranges" json:"rate_time_ranges"` IPv6Password *string `gorm:"column:ipv6_password" json:"ipv6_password"` CreatedAt *time.Time `gorm:"column:created_at" json:"created_at"` UpdatedAt *time.Time `gorm:"column:updated_at" json:"updated_at"` } func (Server) TableName() string { return "v2_server" }