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/tcp-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 TcpRedirect struct {
Id uint64 `json:"id" xorm:"pk autoincr"`
Port int `json:"port"`
Target string `json:"target"`
Enabled *bool `json:"enabled"`
}
func (t TcpRedirect) GetId() uint64 {
return t.Id
}
func (t TcpRedirect) SetEnabled(v bool) TcpRedirect {
t.Enabled = utils.PBool(v)
return t
}
func (t TcpRedirect) ClearForNew() TcpRedirect {
t.Id = 0
return t
}