25 lines
780 B
Go
25 lines
780 B
Go
|
|
// Package gas 定义气站客服工单允许写入的业务枚举。
|
|||
|
|
// 版本:v1.0.0
|
|||
|
|
package gas
|
|||
|
|
|
|||
|
|
var supportedTicketCategories = map[string]struct{}{
|
|||
|
|
"delivery": {}, "installation": {}, "repair": {},
|
|||
|
|
"inspection": {}, "reinspection": {}, "customer_service": {},
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
var supportedTicketPriorities = map[string]struct{}{
|
|||
|
|
"low": {}, "normal": {}, "high": {}, "urgent": {},
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// isSupportedTicketCategory 判断工单分类是否属于气站端公开枚举。
|
|||
|
|
func isSupportedTicketCategory(category string) bool {
|
|||
|
|
_, ok := supportedTicketCategories[category]
|
|||
|
|
return ok
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// isSupportedTicketPriority 判断工单优先级是否属于气站端公开枚举。
|
|||
|
|
func isSupportedTicketPriority(priority string) bool {
|
|||
|
|
_, ok := supportedTicketPriorities[priority]
|
|||
|
|
return ok
|
|||
|
|
}
|