mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-03-14 01:34:47 +08:00
fix: 移除 gorm 类型参数 (#6123)
This commit is contained in:
parent
6da0445509
commit
46fda7ecfb
@ -13,7 +13,7 @@ type WebsiteDTO struct {
|
||||
SitePath string `json:"sitePath"`
|
||||
AppName string `json:"appName"`
|
||||
RuntimeName string `json:"runtimeName"`
|
||||
SiteDir string `gorm:"type:varchar;" json:"siteDir"`
|
||||
SiteDir string `json:"siteDir"`
|
||||
}
|
||||
|
||||
type WebsiteRes struct {
|
||||
|
@ -9,23 +9,23 @@ import (
|
||||
|
||||
type App struct {
|
||||
BaseModel
|
||||
Name string `json:"name" gorm:"type:varchar(64);not null"`
|
||||
Key string `json:"key" gorm:"type:varchar(64);not null;"`
|
||||
ShortDescZh string `json:"shortDescZh" yaml:"shortDescZh" gorm:"type:longtext;"`
|
||||
ShortDescEn string `json:"shortDescEn" yaml:"shortDescEn" gorm:"type:longtext;"`
|
||||
Icon string `json:"icon" gorm:"type:longtext;"`
|
||||
Type string `json:"type" gorm:"type:varchar(64);not null"`
|
||||
Status string `json:"status" gorm:"type:varchar(64);not null"`
|
||||
Required string `json:"required" gorm:"type:varchar(64);"`
|
||||
Name string `json:"name" gorm:"not null"`
|
||||
Key string `json:"key" gorm:"not null;"`
|
||||
ShortDescZh string `json:"shortDescZh" yaml:"shortDescZh"`
|
||||
ShortDescEn string `json:"shortDescEn" yaml:"shortDescEn"`
|
||||
Icon string `json:"icon"`
|
||||
Type string `json:"type" gorm:"not null"`
|
||||
Status string `json:"status" gorm:"not null"`
|
||||
Required string `json:"required"`
|
||||
CrossVersionUpdate bool `json:"crossVersionUpdate" yaml:"crossVersionUpdate"`
|
||||
Limit int `json:"limit" gorm:"type:Integer;not null"`
|
||||
Website string `json:"website" gorm:"type:varchar(64);not null"`
|
||||
Github string `json:"github" gorm:"type:varchar(64);not null"`
|
||||
Document string `json:"document" gorm:"type:varchar(64);not null"`
|
||||
Recommend int `json:"recommend" gorm:"type:Integer;not null"`
|
||||
Resource string `json:"resource" gorm:"type:varchar;not null;default:remote"`
|
||||
ReadMe string `json:"readMe" gorm:"type:varchar;"`
|
||||
LastModified int `json:"lastModified" gorm:"type:Integer;"`
|
||||
Limit int `json:"limit" gorm:"not null"`
|
||||
Website string `json:"website" gorm:"not null"`
|
||||
Github string `json:"github" gorm:"not null"`
|
||||
Document string `json:"document" gorm:"not null"`
|
||||
Recommend int `json:"recommend" gorm:"not null"`
|
||||
Resource string `json:"resource" gorm:"not null;default:remote"`
|
||||
ReadMe string `json:"readMe"`
|
||||
LastModified int `json:"lastModified"`
|
||||
|
||||
Details []AppDetail `json:"-" gorm:"-:migration"`
|
||||
TagsKey []string `json:"tags" yaml:"tags" gorm:"-"`
|
||||
|
@ -2,15 +2,15 @@ package model
|
||||
|
||||
type AppDetail struct {
|
||||
BaseModel
|
||||
AppId uint `json:"appId" gorm:"type:integer;not null"`
|
||||
Version string `json:"version" gorm:"type:varchar(64);not null"`
|
||||
Params string `json:"-" gorm:"type:longtext;"`
|
||||
DockerCompose string `json:"dockerCompose" gorm:"type:longtext;"`
|
||||
Status string `json:"status" gorm:"type:varchar(64);not null"`
|
||||
LastVersion string `json:"lastVersion" gorm:"type:varchar(64);"`
|
||||
LastModified int `json:"lastModified" gorm:"type:integer;"`
|
||||
DownloadUrl string `json:"downloadUrl" gorm:"type:varchar;"`
|
||||
DownloadCallBackUrl string `json:"downloadCallBackUrl" gorm:"type:longtext;"`
|
||||
AppId uint `json:"appId" gorm:"not null"`
|
||||
Version string `json:"version" gorm:"not null"`
|
||||
Params string `json:"-"`
|
||||
DockerCompose string `json:"dockerCompose"`
|
||||
Status string `json:"status" gorm:"not null"`
|
||||
LastVersion string `json:"lastVersion"`
|
||||
LastModified int `json:"lastModified"`
|
||||
DownloadUrl string `json:"downloadUrl"`
|
||||
DownloadCallBackUrl string `json:"downloadCallBackUrl"`
|
||||
Update bool `json:"update"`
|
||||
IgnoreUpgrade bool `json:"ignoreUpgrade"`
|
||||
}
|
||||
|
@ -9,20 +9,20 @@ import (
|
||||
|
||||
type AppInstall struct {
|
||||
BaseModel
|
||||
Name string `json:"name" gorm:"type:varchar(64);not null;UNIQUE"`
|
||||
AppId uint `json:"appId" gorm:"type:integer;not null"`
|
||||
AppDetailId uint `json:"appDetailId" gorm:"type:integer;not null"`
|
||||
Version string `json:"version" gorm:"type:varchar(64);not null"`
|
||||
Param string `json:"param" gorm:"type:longtext;"`
|
||||
Env string `json:"env" gorm:"type:longtext;"`
|
||||
DockerCompose string `json:"dockerCompose" gorm:"type:longtext;"`
|
||||
Status string `json:"status" gorm:"type:varchar(256);not null"`
|
||||
Description string `json:"description" gorm:"type:varchar(256);"`
|
||||
Message string `json:"message" gorm:"type:longtext;"`
|
||||
ContainerName string `json:"containerName" gorm:"type:varchar(256);not null"`
|
||||
ServiceName string `json:"serviceName" gorm:"type:varchar(256);not null"`
|
||||
HttpPort int `json:"httpPort" gorm:"type:integer;not null"`
|
||||
HttpsPort int `json:"httpsPort" gorm:"type:integer;not null"`
|
||||
Name string `json:"name" gorm:"not null;UNIQUE"`
|
||||
AppId uint `json:"appId" gorm:"not null"`
|
||||
AppDetailId uint `json:"appDetailId" gorm:"not null"`
|
||||
Version string `json:"version" gorm:"not null"`
|
||||
Param string `json:"param"`
|
||||
Env string `json:"env"`
|
||||
DockerCompose string `json:"dockerCompose" `
|
||||
Status string `json:"status" gorm:"not null"`
|
||||
Description string `json:"description"`
|
||||
Message string `json:"message"`
|
||||
ContainerName string `json:"containerName" gorm:"not null"`
|
||||
ServiceName string `json:"serviceName" gorm:"not null"`
|
||||
HttpPort int `json:"httpPort" gorm:"not null"`
|
||||
HttpsPort int `json:"httpsPort" gorm:"not null"`
|
||||
App App `json:"app" gorm:"-:migration"`
|
||||
}
|
||||
|
||||
|
@ -2,9 +2,9 @@ package model
|
||||
|
||||
type AppInstallResource struct {
|
||||
BaseModel
|
||||
AppInstallId uint `json:"appInstallId" gorm:"type:integer;not null;"`
|
||||
LinkId uint `json:"linkId" gorm:"type:integer;not null;"`
|
||||
ResourceId uint `json:"resourceId" gorm:"type:integer;"`
|
||||
Key string `json:"key" gorm:"type:varchar(64);not null"`
|
||||
From string `json:"from" gorm:"type:varchar(64);not null;default:local"`
|
||||
AppInstallId uint `json:"appInstallId" gorm:"not null;"`
|
||||
LinkId uint `json:"linkId" gorm:"not null;"`
|
||||
ResourceId uint `json:"resourceId"`
|
||||
Key string `json:"key" gorm:"not null"`
|
||||
From string `json:"from" gorm:"not null;default:local"`
|
||||
}
|
||||
|
@ -2,6 +2,6 @@ package model
|
||||
|
||||
type AppTag struct {
|
||||
BaseModel
|
||||
AppId uint `json:"appId" gorm:"type:integer;not null"`
|
||||
TagId uint `json:"tagId" gorm:"type:integer;not null"`
|
||||
AppId uint `json:"appId" gorm:"not null"`
|
||||
TagId uint `json:"tagId" gorm:"not null"`
|
||||
}
|
||||
|
@ -3,12 +3,12 @@ package model
|
||||
type Clam struct {
|
||||
BaseModel
|
||||
|
||||
Name string `gorm:"type:varchar(64);not null" json:"name"`
|
||||
Status string `gorm:"type:varchar(64)" json:"status"`
|
||||
Path string `gorm:"type:varchar(64);not null" json:"path"`
|
||||
InfectedStrategy string `gorm:"type:varchar(64)" json:"infectedStrategy"`
|
||||
InfectedDir string `gorm:"type:varchar(64)" json:"infectedDir"`
|
||||
Spec string `gorm:"type:varchar(64)" json:"spec"`
|
||||
EntryID int `gorm:"type:varchar(64)" json:"entryID"`
|
||||
Description string `gorm:"type:varchar(64)" json:"description"`
|
||||
Name string `gorm:"not null" json:"name"`
|
||||
Status string `json:"status"`
|
||||
Path string `gorm:"not null" json:"path"`
|
||||
InfectedStrategy string `json:"infectedStrategy"`
|
||||
InfectedDir string `json:"infectedDir"`
|
||||
Spec string `json:"spec"`
|
||||
EntryID int `json:"entryID"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
|
@ -2,13 +2,13 @@ package model
|
||||
|
||||
type Command struct {
|
||||
BaseModel
|
||||
Name string `gorm:"type:varchar(64);unique;not null" json:"name"`
|
||||
GroupID uint `gorm:"type:decimal" json:"groupID"`
|
||||
Command string `gorm:"type:varchar(256);not null" json:"command"`
|
||||
Name string `gorm:"unique;not null" json:"name"`
|
||||
GroupID uint `json:"groupID"`
|
||||
Command string `gorm:"not null" json:"command"`
|
||||
}
|
||||
|
||||
type RedisCommand struct {
|
||||
BaseModel
|
||||
Name string `gorm:"type:varchar(64);unique;not null" json:"name"`
|
||||
Command string `gorm:"type:varchar(256);not null" json:"command"`
|
||||
Name string `gorm:"unique;not null" json:"name"`
|
||||
Command string `gorm:"not null" json:"command"`
|
||||
}
|
||||
|
@ -3,13 +3,13 @@ package model
|
||||
type ComposeTemplate struct {
|
||||
BaseModel
|
||||
|
||||
Name string `gorm:"type:varchar(64);not null;unique" json:"name"`
|
||||
Description string `gorm:"type:varchar(256)" json:"description"`
|
||||
Content string `gorm:"type:longtext" json:"content"`
|
||||
Name string `gorm:"not null;unique" json:"name"`
|
||||
Description string `json:"description"`
|
||||
Content string `json:"content"`
|
||||
}
|
||||
|
||||
type Compose struct {
|
||||
BaseModel
|
||||
|
||||
Name string `gorm:"type:varchar(256)" json:"name"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
@ -2,21 +2,21 @@ package model
|
||||
|
||||
type Database struct {
|
||||
BaseModel
|
||||
AppInstallID uint `json:"appInstallID" gorm:"type:decimal"`
|
||||
Name string `json:"name" gorm:"type:varchar(64);not null;unique"`
|
||||
Type string `json:"type" gorm:"type:varchar(64);not null"`
|
||||
Version string `json:"version" gorm:"type:varchar(64);not null"`
|
||||
From string `json:"from" gorm:"type:varchar(64);not null"`
|
||||
Address string `json:"address" gorm:"type:varchar(64);not null"`
|
||||
Port uint `json:"port" gorm:"type:decimal;not null"`
|
||||
Username string `json:"username" gorm:"type:varchar(64)"`
|
||||
Password string `json:"password" gorm:"type:varchar(64)"`
|
||||
AppInstallID uint `json:"appInstallID"`
|
||||
Name string `json:"name" gorm:"not null;unique"`
|
||||
Type string `json:"type" gorm:"not null"`
|
||||
Version string `json:"version" gorm:"not null"`
|
||||
From string `json:"from" gorm:"not null"`
|
||||
Address string `json:"address" gorm:"not null"`
|
||||
Port uint `json:"port" gorm:"not null"`
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
|
||||
SSL bool `json:"ssl"`
|
||||
RootCert string `json:"rootCert" gorm:"type:longText"`
|
||||
ClientKey string `json:"clientKey" gorm:"type:longText"`
|
||||
ClientCert string `json:"clientCert" gorm:"type:longText"`
|
||||
RootCert string `json:"rootCert"`
|
||||
ClientKey string `json:"clientKey"`
|
||||
ClientCert string `json:"clientCert"`
|
||||
SkipVerify bool `json:"skipVerify"`
|
||||
|
||||
Description string `json:"description" gorm:"type:varchar(256);"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
|
@ -2,13 +2,13 @@ package model
|
||||
|
||||
type DatabaseMysql struct {
|
||||
BaseModel
|
||||
Name string `json:"name" gorm:"type:varchar(256);not null"`
|
||||
From string `json:"from" gorm:"type:varchar(256);not null;default:local"`
|
||||
MysqlName string `json:"mysqlName" gorm:"type:varchar(64);not null"`
|
||||
Format string `json:"format" gorm:"type:varchar(64);not null"`
|
||||
Username string `json:"username" gorm:"type:varchar(256);not null"`
|
||||
Password string `json:"password" gorm:"type:varchar(256);not null"`
|
||||
Permission string `json:"permission" gorm:"type:varchar(256);not null"`
|
||||
IsDelete bool `json:"isDelete" gorm:"type:varchar(64)"`
|
||||
Description string `json:"description" gorm:"type:varchar(256);"`
|
||||
Name string `json:"name" gorm:"not null"`
|
||||
From string `json:"from" gorm:"not null;default:local"`
|
||||
MysqlName string `json:"mysqlName" gorm:"not null"`
|
||||
Format string `json:"format" gorm:"not null"`
|
||||
Username string `json:"username" gorm:"not null"`
|
||||
Password string `json:"password" gorm:"not null"`
|
||||
Permission string `json:"permission" gorm:"not null"`
|
||||
IsDelete bool `json:"isDelete"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
|
@ -2,13 +2,13 @@ package model
|
||||
|
||||
type DatabasePostgresql struct {
|
||||
BaseModel
|
||||
Name string `json:"name" gorm:"type:varchar(256);not null"`
|
||||
From string `json:"from" gorm:"type:varchar(256);not null;default:local"`
|
||||
PostgresqlName string `json:"postgresqlName" gorm:"type:varchar(64);not null"`
|
||||
Format string `json:"format" gorm:"type:varchar(64);not null"`
|
||||
Username string `json:"username" gorm:"type:varchar(256);not null"`
|
||||
Password string `json:"password" gorm:"type:varchar(256);not null"`
|
||||
SuperUser bool `json:"superUser" gorm:"type:varchar(64)"`
|
||||
IsDelete bool `json:"isDelete" gorm:"type:varchar(64)"`
|
||||
Description string `json:"description" gorm:"type:varchar(256);"`
|
||||
Name string `json:"name" gorm:"not null"`
|
||||
From string `json:"from" gorm:"not null;default:local"`
|
||||
PostgresqlName string `json:"postgresqlName" gorm:"not null"`
|
||||
Format string `json:"format" gorm:"not null"`
|
||||
Username string `json:"username" gorm:"not null"`
|
||||
Password string `json:"password" gorm:"not null"`
|
||||
SuperUser bool `json:"superUser"`
|
||||
IsDelete bool `json:"isDelete"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
|
@ -2,9 +2,9 @@ package model
|
||||
|
||||
type Favorite struct {
|
||||
BaseModel
|
||||
Name string `gorm:"type:varchar(256);not null;" json:"name" `
|
||||
Path string `gorm:"type:varchar(256);not null;unique" json:"path"`
|
||||
Type string `gorm:"type:varchar(64);" json:"type"`
|
||||
Name string `gorm:"not null;" json:"name" `
|
||||
Path string `gorm:"not null;unique" json:"path"`
|
||||
Type string `json:"type"`
|
||||
IsDir bool `json:"isDir"`
|
||||
IsTxt bool `json:"isTxt"`
|
||||
}
|
||||
|
@ -3,19 +3,19 @@ package model
|
||||
type Firewall struct {
|
||||
BaseModel
|
||||
|
||||
Type string `gorm:"type:varchar(64);not null" json:"type"`
|
||||
Port string `gorm:"type:varchar(64);not null" json:"port"`
|
||||
Protocol string `gorm:"type:varchar(64);not null" json:"protocol"`
|
||||
Address string `gorm:"type:varchar(64);not null" json:"address"`
|
||||
Strategy string `gorm:"type:varchar(64);not null" json:"strategy"`
|
||||
Description string `gorm:"type:varchar(64);not null" json:"description"`
|
||||
Type string `gorm:"not null" json:"type"`
|
||||
Port string `gorm:"not null" json:"port"`
|
||||
Protocol string `gorm:"not null" json:"protocol"`
|
||||
Address string `gorm:"not null" json:"address"`
|
||||
Strategy string `gorm:"not null" json:"strategy"`
|
||||
Description string `gorm:"not null" json:"description"`
|
||||
}
|
||||
|
||||
type Forward struct {
|
||||
BaseModel
|
||||
|
||||
Protocol string `gorm:"type:varchar(64);not null" json:"protocol"`
|
||||
Port string `gorm:"type:varchar(64);not null" json:"port"`
|
||||
TargetIP string `gorm:"type:varchar(64);not null" json:"targetIP"`
|
||||
TargetPort string `gorm:"type:varchar(64);not null" json:"targetPort"`
|
||||
Protocol string `gorm:"not null" json:"protocol"`
|
||||
Port string `gorm:"not null" json:"port"`
|
||||
TargetIP string `gorm:"not null" json:"targetIP"`
|
||||
TargetPort string `gorm:"not null" json:"targetPort"`
|
||||
}
|
||||
|
@ -3,9 +3,9 @@ package model
|
||||
type Ftp struct {
|
||||
BaseModel
|
||||
|
||||
User string `gorm:"type:varchar(64);not null" json:"user"`
|
||||
Password string `gorm:"type:varchar(64);not null" json:"password"`
|
||||
Status string `gorm:"type:varchar(64);not null" json:"status"`
|
||||
Path string `gorm:"type:varchar(64);not null" json:"path"`
|
||||
Description string `gorm:"type:varchar(64);not null" json:"description"`
|
||||
User string `gorm:"not null" json:"user"`
|
||||
Password string `gorm:"not null" json:"password"`
|
||||
Status string `gorm:"not null" json:"status"`
|
||||
Path string `gorm:"not null" json:"path"`
|
||||
Description string `gorm:"not null" json:"description"`
|
||||
}
|
||||
|
@ -3,6 +3,6 @@ package model
|
||||
type Group struct {
|
||||
BaseModel
|
||||
IsDefault bool `json:"isDefault"`
|
||||
Name string `gorm:"type:varchar(64);not null" json:"name"`
|
||||
Type string `gorm:"type:varchar(16);not null" json:"type"`
|
||||
Name string `gorm:"not null" json:"name"`
|
||||
Type string `gorm:"not null" json:"type"`
|
||||
}
|
||||
|
@ -3,16 +3,16 @@ package model
|
||||
type Host struct {
|
||||
BaseModel
|
||||
|
||||
GroupID uint `gorm:"type:decimal;not null" json:"group_id"`
|
||||
Name string `gorm:"type:varchar(64);not null" json:"name"`
|
||||
Addr string `gorm:"type:varchar(16);not null" json:"addr"`
|
||||
Port int `gorm:"type:decimal;not null" json:"port"`
|
||||
User string `gorm:"type:varchar(64);not null" json:"user"`
|
||||
AuthMode string `gorm:"type:varchar(16);not null" json:"authMode"`
|
||||
Password string `gorm:"type:varchar(64)" json:"password"`
|
||||
PrivateKey string `gorm:"type:varchar(256)" json:"privateKey"`
|
||||
PassPhrase string `gorm:"type:varchar(256)" json:"passPhrase"`
|
||||
GroupID uint `gorm:"not null" json:"group_id"`
|
||||
Name string `gorm:"not null" json:"name"`
|
||||
Addr string `gorm:"not null" json:"addr"`
|
||||
Port int `gorm:"not null" json:"port"`
|
||||
User string `gorm:"not null" json:"user"`
|
||||
AuthMode string `gorm:"not null" json:"authMode"`
|
||||
Password string `json:"password"`
|
||||
PrivateKey string `json:"privateKey"`
|
||||
PassPhrase string `json:"passPhrase"`
|
||||
RememberPassword bool `json:"rememberPassword"`
|
||||
|
||||
Description string `gorm:"type:varchar(256)" json:"description"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
|
@ -3,13 +3,13 @@ package model
|
||||
type ImageRepo struct {
|
||||
BaseModel
|
||||
|
||||
Name string `gorm:"type:varchar(64);not null" json:"name"`
|
||||
DownloadUrl string `gorm:"type:varchar(256)" json:"downloadUrl"`
|
||||
Protocol string `gorm:"type:varchar(64)" json:"protocol"`
|
||||
Username string `gorm:"type:varchar(256)" json:"username"`
|
||||
Password string `gorm:"type:varchar(256)" json:"password"`
|
||||
Auth bool `gorm:"type:varchar(256)" json:"auth"`
|
||||
Name string `gorm:"not null" json:"name"`
|
||||
DownloadUrl string `json:"downloadUrl"`
|
||||
Protocol string `json:"protocol"`
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
Auth bool `json:"auth"`
|
||||
|
||||
Status string `gorm:"type:varchar(64)" json:"status"`
|
||||
Message string `gorm:"type:varchar(256)" json:"message"`
|
||||
Status string `json:"status"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
@ -2,14 +2,14 @@ package model
|
||||
|
||||
type MonitorBase struct {
|
||||
BaseModel
|
||||
Cpu float64 `gorm:"type:float" json:"cpu"`
|
||||
Cpu float64 `json:"cpu"`
|
||||
|
||||
LoadUsage float64 `gorm:"type:float" json:"loadUsage"`
|
||||
CpuLoad1 float64 `gorm:"type:float" json:"cpuLoad1"`
|
||||
CpuLoad5 float64 `gorm:"type:float" json:"cpuLoad5"`
|
||||
CpuLoad15 float64 `gorm:"type:float" json:"cpuLoad15"`
|
||||
LoadUsage float64 `json:"loadUsage"`
|
||||
CpuLoad1 float64 `json:"cpuLoad1"`
|
||||
CpuLoad5 float64 `json:"cpuLoad5"`
|
||||
CpuLoad15 float64 `json:"cpuLoad15"`
|
||||
|
||||
Memory float64 `gorm:"type:float" json:"memory"`
|
||||
Memory float64 `json:"memory"`
|
||||
}
|
||||
|
||||
type MonitorIO struct {
|
||||
@ -24,6 +24,6 @@ type MonitorIO struct {
|
||||
type MonitorNetwork struct {
|
||||
BaseModel
|
||||
Name string `json:"name"`
|
||||
Up float64 `gorm:"type:float" json:"up"`
|
||||
Down float64 `gorm:"type:float" json:"down"`
|
||||
Up float64 `json:"up"`
|
||||
Down float64 `json:"down"`
|
||||
}
|
||||
|
@ -8,20 +8,20 @@ import (
|
||||
|
||||
type Runtime struct {
|
||||
BaseModel
|
||||
Name string `gorm:"type:varchar;not null" json:"name"`
|
||||
AppDetailID uint `gorm:"type:integer" json:"appDetailId"`
|
||||
Image string `gorm:"type:varchar" json:"image"`
|
||||
WorkDir string `gorm:"type:varchar" json:"workDir"`
|
||||
DockerCompose string `gorm:"type:varchar" json:"dockerCompose"`
|
||||
Env string `gorm:"type:varchar" json:"env"`
|
||||
Params string `gorm:"type:varchar" json:"params"`
|
||||
Version string `gorm:"type:varchar;not null" json:"version"`
|
||||
Type string `gorm:"type:varchar;not null" json:"type"`
|
||||
Status string `gorm:"type:varchar;not null" json:"status"`
|
||||
Resource string `gorm:"type:varchar;not null" json:"resource"`
|
||||
Port int `gorm:"type:integer;" json:"port"`
|
||||
Message string `gorm:"type:longtext;" json:"message"`
|
||||
CodeDir string `gorm:"type:varchar;" json:"codeDir"`
|
||||
Name string `gorm:"not null" json:"name"`
|
||||
AppDetailID uint `json:"appDetailId"`
|
||||
Image string `json:"image"`
|
||||
WorkDir string `json:"workDir"`
|
||||
DockerCompose string `json:"dockerCompose"`
|
||||
Env string `json:"env"`
|
||||
Params string `json:"params"`
|
||||
Version string `gorm:"not null" json:"version"`
|
||||
Type string `gorm:"not null" json:"type"`
|
||||
Status string `gorm:"not null" json:"status"`
|
||||
Resource string `gorm:"not null" json:"resource"`
|
||||
Port int `json:"port"`
|
||||
Message string `json:"message"`
|
||||
CodeDir string `json:"codeDir"`
|
||||
}
|
||||
|
||||
func (r *Runtime) GetComposePath() string {
|
||||
|
@ -2,7 +2,7 @@ package model
|
||||
|
||||
type Setting struct {
|
||||
BaseModel
|
||||
Key string `json:"key" gorm:"type:varchar(256);not null;"`
|
||||
Value string `json:"value" gorm:"type:varchar(256)"`
|
||||
About string `json:"about" gorm:"type:longText"`
|
||||
Key string `json:"key" gorm:"not null;"`
|
||||
Value string `json:"value"`
|
||||
About string `json:"about"`
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ package model
|
||||
|
||||
type Tag struct {
|
||||
BaseModel
|
||||
Key string `json:"key" gorm:"type:varchar(64);not null"`
|
||||
Name string `json:"name" gorm:"type:varchar(64);not null"`
|
||||
Sort int `json:"sort" gorm:"type:int;not null;default:1"`
|
||||
Key string `json:"key" gorm:"not null"`
|
||||
Name string `json:"name" gorm:"not null"`
|
||||
Sort int `json:"sort" gorm:"not null;default:1"`
|
||||
}
|
||||
|
@ -2,9 +2,9 @@ package model
|
||||
|
||||
type WebsiteDnsAccount struct {
|
||||
BaseModel
|
||||
Name string `gorm:"type:varchar(64);not null" json:"name"`
|
||||
Type string `gorm:"type:varchar(64);not null" json:"type"`
|
||||
Authorization string `gorm:"type:varchar(256);not null" json:"-"`
|
||||
Name string `gorm:"not null" json:"name"`
|
||||
Type string `gorm:"not null" json:"type"`
|
||||
Authorization string `gorm:"not null" json:"-"`
|
||||
}
|
||||
|
||||
func (w WebsiteDnsAccount) TableName() string {
|
||||
|
@ -2,10 +2,10 @@ package model
|
||||
|
||||
type WebsiteDomain struct {
|
||||
BaseModel
|
||||
WebsiteID uint `gorm:"column:website_id;type:varchar(64);not null;" json:"websiteId"`
|
||||
Domain string `gorm:"type:varchar(256);not null" json:"domain"`
|
||||
WebsiteID uint `gorm:"column:website_id;not null;" json:"websiteId"`
|
||||
Domain string `gorm:"not null" json:"domain"`
|
||||
SSL bool `json:"ssl"`
|
||||
Port int `gorm:"type:integer" json:"port"`
|
||||
Port int `json:"port"`
|
||||
}
|
||||
|
||||
func (w WebsiteDomain) TableName() string {
|
||||
|
@ -28,9 +28,9 @@ type setting struct {
|
||||
ID uint `gorm:"primarykey;AUTO_INCREMENT" json:"id"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
Key string `json:"key" gorm:"type:varchar(256);not null;"`
|
||||
Value string `json:"value" gorm:"type:varchar(256)"`
|
||||
About string `json:"about" gorm:"type:longText"`
|
||||
Key string `json:"key" gorm:"not null;"`
|
||||
Value string `json:"value"`
|
||||
About string `json:"about"`
|
||||
}
|
||||
|
||||
func loadDBConn() (*gorm.DB, error) {
|
||||
|
@ -2,15 +2,15 @@ package model
|
||||
|
||||
type BackupAccount struct {
|
||||
BaseModel
|
||||
Name string `gorm:"type:varchar(64);unique;not null" json:"name"`
|
||||
Type string `gorm:"type:varchar(64);unique;not null" json:"type"`
|
||||
Bucket string `gorm:"type:varchar(256)" json:"bucket"`
|
||||
AccessKey string `gorm:"type:varchar(256)" json:"accessKey"`
|
||||
Credential string `gorm:"type:varchar(256)" json:"credential"`
|
||||
BackupPath string `gorm:"type:varchar(256)" json:"backupPath"`
|
||||
Vars string `gorm:"type:longText" json:"vars"`
|
||||
Name string `gorm:"unique;not null" json:"name"`
|
||||
Type string `gorm:"unique;not null" json:"type"`
|
||||
Bucket string `json:"bucket"`
|
||||
AccessKey string `json:"accessKey"`
|
||||
Credential string `json:"credential"`
|
||||
BackupPath string `json:"backupPath"`
|
||||
Vars string `json:"vars"`
|
||||
|
||||
RememberAuth bool `gorm:"type:varchar(64)" json:"rememberAuth"`
|
||||
InUsed bool `gorm:"type:varchar(64)" json:"inUsed"`
|
||||
EntryID uint `gorm:"type:varchar(64)" json:"entryID"`
|
||||
RememberAuth bool `json:"rememberAuth"`
|
||||
InUsed bool `json:"inUsed"`
|
||||
EntryID uint `json:"entryID"`
|
||||
}
|
||||
|
@ -6,26 +6,25 @@ import (
|
||||
|
||||
type OperationLog struct {
|
||||
BaseModel
|
||||
Source string `gorm:"type:varchar(64)" json:"source"`
|
||||
Source string `json:"source"`
|
||||
IP string `json:"ip"`
|
||||
Path string `json:"path"`
|
||||
Method string `json:"method"`
|
||||
UserAgent string `json:"userAgent"`
|
||||
|
||||
IP string `gorm:"type:varchar(64)" json:"ip"`
|
||||
Path string `gorm:"type:varchar(64)" json:"path"`
|
||||
Method string `gorm:"type:varchar(64)" json:"method"`
|
||||
UserAgent string `gorm:"type:varchar(256)" json:"userAgent"`
|
||||
Latency time.Duration `json:"latency"`
|
||||
Status string `json:"status"`
|
||||
Message string `json:"message"`
|
||||
|
||||
Latency time.Duration `gorm:"type:varchar(64)" json:"latency"`
|
||||
Status string `gorm:"type:varchar(64)" json:"status"`
|
||||
Message string `gorm:"type:varchar(256)" json:"message"`
|
||||
|
||||
DetailZH string `gorm:"type:varchar(256)" json:"detailZH"`
|
||||
DetailEN string `gorm:"type:varchar(256)" json:"detailEN"`
|
||||
DetailZH string `json:"detailZH"`
|
||||
DetailEN string `json:"detailEN"`
|
||||
}
|
||||
|
||||
type LoginLog struct {
|
||||
BaseModel
|
||||
IP string `gorm:"type:varchar(64)" json:"ip"`
|
||||
Address string `gorm:"type:varchar(64)" json:"address"`
|
||||
Agent string `gorm:"type:varchar(256)" json:"agent"`
|
||||
Status string `gorm:"type:varchar(64)" json:"status"`
|
||||
Message string `gorm:"type:longText" json:"message"`
|
||||
IP string `json:"ip"`
|
||||
Address string `json:"address"`
|
||||
Agent string `json:"agent"`
|
||||
Status string `json:"status"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ package model
|
||||
|
||||
type Setting struct {
|
||||
BaseModel
|
||||
Key string `json:"key" gorm:"type:varchar(256);not null;"`
|
||||
Value string `json:"value" gorm:"type:varchar(256)"`
|
||||
About string `json:"about" gorm:"type:longText"`
|
||||
Key string `json:"key" gorm:"not null;"`
|
||||
Value string `json:"value"`
|
||||
About string `json:"about"`
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user