add cname files

This commit is contained in:
Ben
2021-07-28 22:03:37 +02:00
parent dbc137366e
commit 711f80b3a2
4 changed files with 207 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
package model
import (
"github.com/jinzhu/gorm"
)
// CName is a dns cname entry.
type CName struct {
gorm.Model
Hostname string `gorm:"not null" form:"hostname" validate:"required,hostname"`
Target Host `validate:"required,hostname"`
TargetID uint
Ttl int `form:"ttl" validate:"required,min=20,max=86400"`
}