1Panel/backend/app/model/website.go

29 lines
1.3 KiB
Go
Raw Normal View History

2022-10-28 17:04:57 +08:00
package model
import "time"
2022-12-13 17:20:13 +08:00
type Website struct {
2022-10-28 17:04:57 +08:00
BaseModel
2022-11-21 11:27:56 +08:00
Protocol string `gorm:"type:varchar(64);not null" json:"protocol"`
2022-11-19 17:16:02 +08:00
PrimaryDomain string `gorm:"type:varchar(128);not null" json:"primaryDomain"`
Type string `gorm:"type:varchar(64);not null" json:"type"`
Alias string `gorm:"type:varchar(128);not null" json:"alias"`
Remark string `gorm:"type:longtext;" json:"remark"`
Status string `gorm:"type:varchar(64);not null" json:"status"`
2022-12-28 16:07:43 +08:00
HttpConfig string `gorm:"type:varchar(64);not null" json:"httpConfig"`
2022-11-19 17:16:02 +08:00
ExpireDate time.Time `json:"expireDate"`
AppInstallID uint `gorm:"type:integer" json:"appInstallId"`
2022-12-13 17:20:13 +08:00
WebsiteGroupID uint `gorm:"type:integer" json:"webSiteGroupId"`
WebsiteSSLID uint `gorm:"type:integer" json:"webSiteSSLId"`
2022-12-12 15:36:45 +08:00
Proxy string `gorm:"type:varchar(128);not null" json:"proxy"`
2022-12-30 17:39:17 +08:00
ErrorLog bool `json:"errorLog"`
AccessLog bool `json:"accessLog"`
2023-01-03 16:56:36 +08:00
DefaultServer bool `json:"defaultServer"`
Domains []WebsiteDomain `json:"domains" gorm:"-:migration"`
WebsiteSSL WebsiteSSL `json:"webSiteSSL" gorm:"-:migration"`
2022-11-11 17:41:39 +08:00
}
2022-12-13 17:20:13 +08:00
func (w Website) TableName() string {
2022-11-11 17:41:39 +08:00
return "websites"
2022-10-28 17:04:57 +08:00
}