yinbangzhong
2024-07-22 de6deb8ea9db498a81dc1d841b19e7917d7e5a41
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package constvar
 
type AudioStatus int
 
const (
    AudioStatusUploading  AudioStatus = iota // 上传中
    AudioStatusUploadOk                      // 上传成功 待处理
    AudioStatusProcessing                    // 处理中
    AudioStatusFinish                        // 处理完成
    AudioStatusFailed                        // 处理失败
)
 
// BoolType 布尔类型
type BoolType int
 
const (
    BoolTypeTrue  BoolType = 1 // true
    BoolTypeFalse BoolType = 2 // false
)
 
func (slf BoolType) IsValid() bool {
    return slf == BoolTypeTrue || slf == BoolTypeFalse
}
 
func (slf BoolType) Bool() bool {
    return slf == BoolTypeTrue
}
 
type Class int
 
const (
    ClassLocomotive Class = 1 //机车
    ClassTrain      Class = 2 //车次
    ClassStation    Class = 3 //车站
)