2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-06 06:17:16 +08:00

feat(证书管理): 不返回关联的模型信息

This commit is contained in:
耗子
2023-11-07 02:09:29 +08:00
parent 70601dfb00
commit e032faeae0
6 changed files with 5 additions and 154 deletions

View File

@@ -18,7 +18,7 @@ type Cert struct {
CreatedAt carbon.DateTime `gorm:"autoCreateTime;column:created_at" json:"created_at"`
UpdatedAt carbon.DateTime `gorm:"autoUpdateTime;column:updated_at" json:"updated_at"`
Website *Website `gorm:"foreignKey:WebsiteID" json:"website"`
User *CertUser `gorm:"foreignKey:UserID" json:"user"`
DNS *CertDNS `gorm:"foreignKey:DNSID" json:"dns"`
Website *Website `gorm:"foreignKey:WebsiteID" json:"-"`
User *CertUser `gorm:"foreignKey:UserID" json:"-"`
DNS *CertDNS `gorm:"foreignKey:DNSID" json:"-"`
}

View File

@@ -14,7 +14,7 @@ type CertDNS struct {
CreatedAt carbon.DateTime `gorm:"autoCreateTime;column:created_at" json:"created_at"`
UpdatedAt carbon.DateTime `gorm:"autoUpdateTime;column:updated_at" json:"updated_at"`
Certs []*Cert `gorm:"foreignKey:DNSID" json:"certs"`
Certs []*Cert `gorm:"foreignKey:DNSID" json:"-"`
}
func (CertDNS) TableName() string {

View File

@@ -15,5 +15,5 @@ type CertUser struct {
CreatedAt carbon.DateTime `gorm:"autoCreateTime;column:created_at" json:"created_at"`
UpdatedAt carbon.DateTime `gorm:"autoUpdateTime;column:updated_at" json:"updated_at"`
Certs []*Cert `gorm:"foreignKey:UserID" json:"certs"`
Certs []*Cert `gorm:"foreignKey:UserID" json:"-"`
}