model/meta/MetaTargetZoneType.go

40 lines
879 B
Go
Raw Permalink Normal View History

2018-08-12 10:46:46 +00:00
package meta
type MetaTargetZoneType struct {
MetaTargetType
}
type MetaTargetZoneTypeEnum int
const (
MetaTargetZoneTypeEnumUNKNOWN MetaTargetZoneTypeEnum = iota + 1
MetaTargetZoneTypeEnumZONE
)
var (
metaTargetZoneTypeEnumID = map[MetaTargetZoneTypeEnum]string{
MetaTargetZoneTypeEnumUNKNOWN: "UNKNOWN",
MetaTargetZoneTypeEnumZONE: "ZONE",
}
metaTargetZoneTypeEnumKey = map[string]MetaTargetZoneTypeEnum{
"UNKNOWN": MetaTargetZoneTypeEnumUNKNOWN,
"ZONE": MetaTargetZoneTypeEnumZONE,
}
)
func (e MetaTargetZoneTypeEnum) String() string {
return metaTargetZoneTypeEnumID[e]
}
func ToMetaTargetZoneTypeEnum(v *MetaTargetZoneType) MetaTargetZoneTypeEnum {
return metaTargetZoneTypeEnumKey[v.Key]
}
func ToMetaTargetZoneType(v MetaTargetZoneTypeEnum) *MetaTargetZoneType {
m := &MetaTargetZoneType{}
m.Key = metaTargetZoneTypeEnumID[v]
return m
}