This repository has been archived on 2024-04-07. You can view files and clone it, but cannot push or open issues or pull requests.
summer-utils/tables/web/api-domain.go
2023-04-16 11:56:17 +01:00

28 lines
524 B
Go

package web
import (
"code.mrmelon54.com/melon/summer/pkg/utils"
)
type ApiDomain struct {
Id uint64 `json:"id" xorm:"pk autoincr"`
Domain string `json:"domain"`
DstHome string `json:"dst_home"`
Enabled *bool `json:"enabled"`
LiveRoutes []ApiRoute `json:"-" xorm:"-"`
}
func (a ApiDomain) GetId() uint64 {
return a.Id
}
func (a ApiDomain) SetEnabled(v bool) ApiDomain {
a.Enabled = utils.PBool(v)
return a
}
func (a ApiDomain) ClearForNew() ApiDomain {
a.Id = 0
return a
}