forked from ebhomengo/niki
1
0
Fork 0
niki/entity/admin_status.go

20 lines
346 B
Go
Raw Normal View History

2024-01-02 15:35:26 +00:00
package entity
type AdminStatus string
2024-01-02 15:35:26 +00:00
const (
AdminActiveStatus = AdminStatus("active")
AdminInactiveStatus = AdminStatus("inactive")
2024-01-02 15:35:26 +00:00
)
var AdminStatusStrings = map[AdminStatus]string{
AdminActiveStatus: "active",
AdminInactiveStatus: "inactive",
2024-01-02 15:35:26 +00:00
}
func (a AdminStatus) IsValid() bool {
_, ok := AdminStatusStrings[a]
2024-01-02 15:35:26 +00:00
return ok
2024-01-02 15:35:26 +00:00
}