UPDATE: Historian module
All checks were successful
Build and Release / release (push) Successful in 1m20s

This commit is contained in:
2026-04-12 00:35:14 +07:00
parent af76d2a26a
commit 03415782d1
38 changed files with 2759 additions and 231 deletions

View File

@@ -3,6 +3,7 @@ package constants
type StatusType int16
const (
StatusUnknown StatusType = 0
StatusPending StatusType = 1
StatusApproved StatusType = 2
StatusRejected StatusType = 3
@@ -21,6 +22,10 @@ func (t StatusType) String() string {
}
}
func (t StatusType) Int16() int16 {
return int16(t)
}
func ParseStatusType(v int16) StatusType {
switch v {
case 1:
@@ -30,6 +35,19 @@ func ParseStatusType(v int16) StatusType {
case 3:
return StatusRejected
default:
return 0
return StatusUnknown
}
}
func ParseStatusTypeText(v string) StatusType {
switch v {
case "PENDING":
return StatusPending
case "APPROVED":
return StatusApproved
case "REJECT":
return StatusRejected
default:
return StatusUnknown
}
}