UPDATE: Project Module
All checks were successful
Build and Release / release (push) Successful in 1m15s

This commit is contained in:
2026-04-25 14:05:15 +07:00
parent 44a63f29c6
commit ac90236022
71 changed files with 5110 additions and 257 deletions

66
pkg/constants/geometry.go Normal file
View File

@@ -0,0 +1,66 @@
package constants
type GeoType int16
const (
GeoTypeID GeoType = 1
GeoTypeName GeoType = 2
GeoTypeIcon GeoType = 3
GeoTypeVariant GeoType = 4
GeoTypeDescription GeoType = 5
GeoTypeUnknow GeoType = 0
)
func (t GeoType) String() string {
switch t {
case GeoTypeID:
return "ID"
case GeoTypeName:
return "NAME"
case GeoTypeIcon:
return "ICON"
case GeoTypeVariant:
return "VARIANT"
case GeoTypeDescription:
return "DESCRIPTION"
default:
return "UNKNOW"
}
}
func ParseGeoTypeText(v string) GeoType {
switch v {
case "ID":
return GeoTypeID
case "NAME":
return GeoTypeName
case "ICON":
return GeoTypeIcon
case "VARIANT":
return GeoTypeVariant
case "DESCRIPTION":
return GeoTypeDescription
default:
return GeoTypeUnknow
}
}
func ParseGeoType(v int16) GeoType {
switch v {
case 1:
return GeoTypeID
case 2:
return GeoTypeName
case 3:
return GeoTypeIcon
case 4:
return GeoTypeVariant
case 5:
return GeoTypeDescription
default:
return GeoTypeUnknow
}
}
func (t GeoType) Int16() int16 {
return int16(t)
}