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/udp-redirect.go
2023-04-16 11:56:17 +01:00

25 lines
456 B
Go

package web
import "code.mrmelon54.com/melon/summer/pkg/utils"
type UdpRedirect struct {
Id uint64 `json:"id" xorm:"pk autoincr"`
Port int `json:"port"`
Target string `json:"target"`
Enabled *bool `json:"enabled"`
}
func (u UdpRedirect) GetId() uint64 {
return u.Id
}
func (u UdpRedirect) SetEnabled(v bool) UdpRedirect {
u.Enabled = utils.PBool(v)
return u
}
func (u UdpRedirect) ClearForNew() UdpRedirect {
u.Id = 0
return u
}