-
-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
95 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,16 @@ | ||
package models | ||
|
||
import ( | ||
"github.com/goravel/framework/support/carbon" | ||
"github.com/goravel/framework/database/orm" | ||
|
||
"github.com/TheTNB/panel/pkg/acme" | ||
) | ||
|
||
type CertDNS struct { | ||
ID uint `gorm:"primaryKey" json:"id"` | ||
Name string `gorm:"not null" json:"name"` // 备注名称 | ||
Type string `gorm:"not null" json:"type"` // DNS 提供商 (dnspod, aliyun, cloudflare) | ||
Data acme.DNSParam `gorm:"type:json;serializer:json" json:"dns_param"` | ||
CreatedAt carbon.DateTime `gorm:"autoCreateTime;column:created_at" json:"created_at"` | ||
UpdatedAt carbon.DateTime `gorm:"autoUpdateTime;column:updated_at" json:"updated_at"` | ||
orm.Model | ||
Name string `gorm:"not null" json:"name"` // 备注名称 | ||
Type string `gorm:"not null" json:"type"` // DNS 提供商 (dnspod, aliyun, cloudflare) | ||
Data acme.DNSParam `gorm:"not null;serializer:json" json:"dns_param"` | ||
|
||
Certs []*Cert `gorm:"foreignKey:DNSID" json:"-"` | ||
} | ||
|
||
func (CertDNS) TableName() string { | ||
return "cert_dns" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,15 @@ | ||
package models | ||
|
||
import ( | ||
"github.com/goravel/framework/support/carbon" | ||
) | ||
import "github.com/goravel/framework/database/orm" | ||
|
||
type CertUser struct { | ||
ID uint `gorm:"primaryKey" json:"id"` | ||
Email string `gorm:"not null" json:"email"` | ||
CA string `gorm:"not null" json:"ca"` // CA 提供商 (letsencrypt, zerossl, sslcom, google, buypass) | ||
Kid *string `gorm:"default:null" json:"kid"` | ||
HmacEncoded *string `gorm:"default:null" json:"hmac_encoded"` | ||
PrivateKey string `gorm:"not null" json:"private_key"` | ||
KeyType string `gorm:"not null" json:"key_type"` | ||
CreatedAt carbon.DateTime `gorm:"autoCreateTime;column:created_at" json:"created_at"` | ||
UpdatedAt carbon.DateTime `gorm:"autoUpdateTime;column:updated_at" json:"updated_at"` | ||
orm.Model | ||
Email string `gorm:"not null" json:"email"` | ||
CA string `gorm:"not null" json:"ca"` // CA 提供商 (letsencrypt, zerossl, sslcom, google, buypass) | ||
Kid string `gorm:"not null" json:"kid"` | ||
HmacEncoded string `gorm:"not null" json:"hmac_encoded"` | ||
PrivateKey string `gorm:"not null" json:"private_key"` | ||
KeyType string `gorm:"not null" json:"key_type"` | ||
|
||
Certs []*Cert `gorm:"foreignKey:UserID" json:"-"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
package models | ||
|
||
import ( | ||
"github.com/goravel/framework/support/carbon" | ||
) | ||
import "github.com/goravel/framework/database/orm" | ||
|
||
type Cron struct { | ||
ID uint `gorm:"primaryKey" json:"id"` | ||
Name string `gorm:"not null;unique" json:"name"` | ||
Status bool `gorm:"not null;default:false" json:"status"` | ||
Type string `gorm:"not null" json:"type"` | ||
Time string `gorm:"not null" json:"time"` | ||
Shell string `gorm:"default:''" json:"shell"` | ||
Log string `gorm:"default:''" json:"log"` | ||
CreatedAt carbon.DateTime `gorm:"autoCreateTime;column:created_at" json:"created_at"` | ||
UpdatedAt carbon.DateTime `gorm:"autoUpdateTime;column:updated_at" json:"updated_at"` | ||
orm.Model | ||
Name string `gorm:"not null;unique" json:"name"` | ||
Status bool `gorm:"not null" json:"status"` | ||
Type string `gorm:"not null" json:"type"` | ||
Time string `gorm:"not null" json:"time"` | ||
Shell string `gorm:"not null" json:"shell"` | ||
Log string `gorm:"not null" json:"log"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
package models | ||
|
||
import "github.com/goravel/framework/support/carbon" | ||
import "github.com/goravel/framework/database/orm" | ||
|
||
type Database struct { | ||
ID uint `gorm:"primaryKey" json:"id"` | ||
Name string `gorm:"unique;not null" json:"name"` | ||
Type string `gorm:"not null;index" json:"type"` | ||
Host string `gorm:"not null" json:"host"` | ||
Port int `gorm:"not null" json:"port"` | ||
Username string `gorm:"not null" json:"username"` | ||
Password string `gorm:"default:''" json:"password"` | ||
Remark string `gorm:"default:''" json:"remark"` | ||
CreatedAt carbon.DateTime `gorm:"autoCreateTime;column:created_at" json:"created_at"` | ||
UpdatedAt carbon.DateTime `gorm:"autoUpdateTime;column:updated_at" json:"updated_at"` | ||
orm.Model | ||
Name string `gorm:"not null;unique" json:"name"` | ||
Type string `gorm:"not null" json:"type"` | ||
Host string `gorm:"not null" json:"host"` | ||
Port int `gorm:"not null" json:"port"` | ||
Username string `gorm:"not null" json:"username"` | ||
Password string `gorm:"not null" json:"password"` | ||
Remark string `gorm:"not null" json:"remark"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
package models | ||
|
||
import ( | ||
"github.com/goravel/framework/support/carbon" | ||
"github.com/goravel/framework/database/orm" | ||
|
||
"github.com/TheTNB/panel/pkg/tools" | ||
) | ||
|
||
type Monitor struct { | ||
ID uint `gorm:"primaryKey" json:"id"` | ||
Info tools.MonitoringInfo `gorm:"type:json;serializer:json" json:"info"` | ||
CreatedAt carbon.DateTime `gorm:"autoCreateTime;column:created_at" json:"created_at"` | ||
UpdatedAt carbon.DateTime `gorm:"autoUpdateTime;column:updated_at" json:"updated_at"` | ||
orm.Model | ||
Info tools.MonitoringInfo `gorm:"not null;serializer:json" json:"info"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
package models | ||
|
||
import "github.com/goravel/framework/support/carbon" | ||
import "github.com/goravel/framework/database/orm" | ||
|
||
type Plugin struct { | ||
ID uint `gorm:"primaryKey" json:"id"` | ||
Slug string `gorm:"unique;not null" json:"slug"` | ||
Version string `gorm:"not null" json:"version"` | ||
Show bool `gorm:"default:false;not null" json:"show"` | ||
ShowOrder int `gorm:"default:0;not null" json:"show_order"` | ||
CreatedAt carbon.DateTime `gorm:"autoCreateTime;column:created_at" json:"created_at"` | ||
UpdatedAt carbon.DateTime `gorm:"autoUpdateTime;column:updated_at" json:"updated_at"` | ||
orm.Model | ||
Slug string `gorm:"not null;unique" json:"slug"` | ||
Version string `gorm:"not null" json:"version"` | ||
Show bool `gorm:"not null" json:"show"` | ||
ShowOrder int `gorm:"not null" json:"show_order"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
package models | ||
|
||
import "github.com/goravel/framework/support/carbon" | ||
import "github.com/goravel/framework/database/orm" | ||
|
||
type User struct { | ||
ID uint `gorm:"primaryKey" json:"id"` | ||
Username string `gorm:"unique;not null" json:"username"` | ||
Password string `gorm:"not null" json:"password"` | ||
Email string `gorm:"default:''" json:"email"` | ||
CreatedAt carbon.DateTime `gorm:"autoCreateTime;column:created_at" json:"created_at"` | ||
UpdatedAt carbon.DateTime `gorm:"autoUpdateTime;column:updated_at" json:"updated_at"` | ||
orm.Model | ||
Username string `gorm:"not null;unique" json:"username"` | ||
Password string `gorm:"not null" json:"password"` | ||
Email string `gorm:"not null" json:"email"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,15 @@ | ||
package models | ||
|
||
import ( | ||
"github.com/goravel/framework/support/carbon" | ||
) | ||
import "github.com/goravel/framework/database/orm" | ||
|
||
type Website struct { | ||
ID uint `gorm:"primaryKey" json:"id"` | ||
Name string `json:"name"` | ||
Status bool `gorm:"default:true" json:"status"` | ||
Path string `json:"path"` | ||
Php int `gorm:"default:0;not null;index" json:"php"` | ||
Ssl bool `gorm:"default:false;not null;index" json:"ssl"` | ||
Remark string `gorm:"default:''" json:"remark"` | ||
CreatedAt carbon.DateTime `gorm:"autoCreateTime;column:created_at" json:"created_at"` | ||
UpdatedAt carbon.DateTime `gorm:"autoUpdateTime;column:updated_at" json:"updated_at"` | ||
orm.Model | ||
Name string `gorm:"not null;unique" json:"name"` | ||
Status bool `gorm:"not null;default:true" json:"status"` | ||
Path string `gorm:"not null" json:"path"` | ||
Php int `gorm:"not null" json:"php"` | ||
Ssl bool `gorm:"not null" json:"ssl"` | ||
Remark string `gorm:"not null" json:"remark"` | ||
|
||
Cert *Cert `gorm:"foreignKey:WebsiteID" json:"cert"` | ||
} |
Oops, something went wrong.