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

27 lines
470 B
Go

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