mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2026-03-14 20:15:36 +08:00
优化代码
This commit is contained in:
@@ -7,7 +7,7 @@ type NSDomain struct {
|
||||
Id uint32 `field:"id"` // ID
|
||||
ClusterId uint32 `field:"clusterId"` // 集群ID
|
||||
UserId uint32 `field:"userId"` // 用户ID
|
||||
IsOn uint8 `field:"isOn"` // 是否启用
|
||||
IsOn bool `field:"isOn"` // 是否启用
|
||||
Name string `field:"name"` // 域名
|
||||
CreatedAt uint64 `field:"createdAt"` // 创建时间
|
||||
Version uint64 `field:"version"` // 版本
|
||||
|
||||
@@ -3,7 +3,7 @@ package nameservers
|
||||
// NSKey 密钥管理
|
||||
type NSKey struct {
|
||||
Id uint64 `field:"id"` // ID
|
||||
IsOn uint8 `field:"isOn"` // 状态
|
||||
IsOn bool `field:"isOn"` // 状态
|
||||
Name string `field:"name"` // 名称
|
||||
DomainId uint64 `field:"domainId"` // 域名ID
|
||||
ZoneId uint64 `field:"zoneId"` // 子域ID
|
||||
|
||||
@@ -6,7 +6,7 @@ import "github.com/iwind/TeaGo/dbs"
|
||||
type NSRecord struct {
|
||||
Id uint64 `field:"id"` // ID
|
||||
DomainId uint32 `field:"domainId"` // 域名ID
|
||||
IsOn uint8 `field:"isOn"` // 是否启用
|
||||
IsOn bool `field:"isOn"` // 是否启用
|
||||
Description string `field:"description"` // 备注
|
||||
Name string `field:"name"` // 记录名
|
||||
Type string `field:"type"` // 类型
|
||||
|
||||
@@ -107,7 +107,7 @@ func (this *NSRouteDAO) FindEnabledRouteWithCode(tx *dbs.Tx, code string) (*NSRo
|
||||
|
||||
return &NSRoute{
|
||||
Id: 0,
|
||||
IsOn: 1,
|
||||
IsOn: true,
|
||||
Name: route.Name,
|
||||
Code: route.Code,
|
||||
State: NSRouteStateEnabled,
|
||||
|
||||
@@ -5,7 +5,7 @@ import "github.com/iwind/TeaGo/dbs"
|
||||
// NSRoute DNS线路
|
||||
type NSRoute struct {
|
||||
Id uint32 `field:"id"` // ID
|
||||
IsOn uint8 `field:"isOn"` // 是否启用
|
||||
IsOn bool `field:"isOn"` // 是否启用
|
||||
ClusterId uint32 `field:"clusterId"` // 集群ID
|
||||
DomainId uint32 `field:"domainId"` // 域名ID
|
||||
UserId uint32 `field:"userId"` // 用户ID
|
||||
|
||||
@@ -6,7 +6,7 @@ import "github.com/iwind/TeaGo/dbs"
|
||||
type NSZone struct {
|
||||
Id uint64 `field:"id"` // ID
|
||||
DomainId uint64 `field:"domainId"` // 域名ID
|
||||
IsOn uint8 `field:"isOn"` // 是否启用
|
||||
IsOn bool `field:"isOn"` // 是否启用
|
||||
Order uint32 `field:"order"` // 排序
|
||||
Version uint64 `field:"version"` // 版本
|
||||
Tsig dbs.JSON `field:"tsig"` // TSIG配置
|
||||
|
||||
Reference in New Issue
Block a user