package model

type Proxy struct {
	Id                       int64  `gorm:"column:id"`
	AdminId                  int64  `gorm:"column:adminId"`
	UserId                   int64  `gorm:"column:userId"`
	TemplateId               int64  `gorm:"column:templateId"`
	IsOn                     int64  `gorm:"column:isOn"`
	Scheduling               string `gorm:"column:scheduling"`
	PrimaryOrigins           string `gorm:"column:primaryOrigins"`
	BackupOrigins            string `gorm:"column:backupOrigins"`
	StripPrefix              string `gorm:"column:stripPrefix"`
	RequestHostType          int32  `gorm:"column:requestHostType"`
	RequestHost              string `gorm:"column:requestHost"`
	RequestHostExcludingPort bool   `gorm:"column:requestHostExcludingPort"`
	RequestURI               string `gorm:"column:requestURI"`
	AutoFlush                bool   `gorm:"column:autoFlush"`
	AddHeaders               string `gorm:"column:addHeaders"`
	State                    int64  `gorm:"column:state"`
	CreatedAt                int64  `gorm:"column:createdAt"`
	ConnTimeout              string `gorm:"column:connTimeout"`
	ReadTimeout              string `gorm:"column:readTimeout"`
	IdleTimeout              string `gorm:"column:idleTimeout"`
	MaxConns                 int64  `gorm:"column:maxConns"`
	MaxIdleConns             int64  `gorm:"column:maxIdleConns"`
	ProxyProtocol            string `gorm:"column:proxyProtocol"`
	FollowRedirects          bool   `gorm:"column:followRedirects"`
	Retry50X                 bool   `gorm:"column:retry50X"`
	Retry40X                 bool   `gorm:"column:retry40X"`
}

func (m *Proxy) TableName() string {
    return "cloud_reverse_proxies"
}
