2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-06 14:47:18 +08:00
Files
panel/internal/biz/cert_dns.go
2025-09-18 23:24:03 +08:00

28 lines
830 B
Go

package biz
import (
"time"
"github.com/acepanel/panel/internal/http/request"
"github.com/acepanel/panel/pkg/acme"
)
type CertDNS struct {
ID uint `gorm:"primaryKey" json:"id"`
Name string `gorm:"not null;default:''" json:"name"` // 备注名称
Type acme.DnsType `gorm:"not null;default:'aliyun'" json:"type"` // DNS 提供商
Data acme.DNSParam `gorm:"not null;serializer:json" json:"dns_param"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Certs []*Cert `gorm:"foreignKey:DNSID" json:"-"`
}
type CertDNSRepo interface {
List(page, limit uint) ([]*CertDNS, int64, error)
Get(id uint) (*CertDNS, error)
Create(req *request.CertDNSCreate) (*CertDNS, error)
Update(req *request.CertDNSUpdate) error
Delete(id uint) error
}