Files
nginx-ui/model/dns_domain.go
Jacky 9225c96250 feat/dns (#1466)
* feat: dns management

* refactor(dns): streamline domain management functions and enhance validation

* feat(dns): add value suggestions for DNS record input with autocomplete functionality

* fix(dns): handle edge case in record listing pagination

* fix(dns): update credential property name for consistency and add cleanup on component unmount

* feat(dns): implement DDNS management #1194, #1140
2025-12-08 17:45:30 +08:00

13 lines
601 B
Go

package model
// DnsDomain represents a managed domain bound to a DNS credential.
type DnsDomain struct {
Model
Domain string `json:"domain" gorm:"size:255;not null;uniqueIndex:idx_dns_domain_credential"`
Description string `json:"description"`
DnsCredentialID uint64 `json:"dns_credential_id" gorm:"not null;uniqueIndex:idx_dns_domain_credential"`
DnsCredential *DnsCredential `json:"dns_credential,omitempty" gorm:"constraint:OnDelete:CASCADE;"`
DDNSConfig *DDNSConfig `json:"ddns_config,omitempty" gorm:"column:ddns_config;serializer:json"`
}