重构增加模型枚举值定义
This commit is contained in:
7
web/domains/announcement/types.go
Normal file
7
web/domains/announcement/types.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package announcement
|
||||
|
||||
type Type int32
|
||||
|
||||
const (
|
||||
TypeNormal Type = iota + 1 // 普通公告
|
||||
)
|
||||
9
web/domains/bill/types.go
Normal file
9
web/domains/bill/types.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package bill
|
||||
|
||||
type Type int32
|
||||
|
||||
const (
|
||||
TypeConsume Type = iota + 1 // 消费
|
||||
TypeRefund // 退款
|
||||
TypeRecharge // 充值
|
||||
)
|
||||
9
web/domains/channel/types.go
Normal file
9
web/domains/channel/types.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package channel
|
||||
|
||||
type Protocol int32
|
||||
|
||||
const (
|
||||
ProtocolHttp Protocol = iota + 1
|
||||
ProtocolHttps
|
||||
ProtocolSocks5
|
||||
)
|
||||
10
web/domains/client/types.go
Normal file
10
web/domains/client/types.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package client
|
||||
|
||||
type Spec int32
|
||||
|
||||
const (
|
||||
SpecNative Spec = iota + 1 // 原生客户端
|
||||
SpecBrowser // 浏览器客户端
|
||||
SpecWeb // Web 服务
|
||||
SpecTrusted // 可信服务
|
||||
)
|
||||
9
web/domains/coupon/types.go
Normal file
9
web/domains/coupon/types.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package coupon
|
||||
|
||||
type Status int32
|
||||
|
||||
const (
|
||||
StatusUnused = iota // 未使用
|
||||
StatusUsed // 已使用
|
||||
StatusExpired // 已过期
|
||||
)
|
||||
10
web/domains/node/types.go
Normal file
10
web/domains/node/types.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package node
|
||||
|
||||
type ISP int32
|
||||
|
||||
const (
|
||||
IspUnknown ISP = iota // 未知
|
||||
IspChinaTelecom // 中国电信
|
||||
IspChinaUnicom // 中国联通
|
||||
IspChinaMobile // 中国移动
|
||||
)
|
||||
8
web/domains/proxy/types.go
Normal file
8
web/domains/proxy/types.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package proxy
|
||||
|
||||
type Type int32
|
||||
|
||||
const (
|
||||
TypeThirdParty Type = iota + 1 // 三方代理
|
||||
TypeSelfHosted // 自建代理
|
||||
)
|
||||
9
web/domains/refund/types.go
Normal file
9
web/domains/refund/types.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package refund
|
||||
|
||||
type Status int32
|
||||
|
||||
const (
|
||||
StatusHandling Status = iota + 1 // 待处理
|
||||
StatusSuccess // 已退款
|
||||
StatusRefused // 已拒绝
|
||||
)
|
||||
16
web/domains/resource/types.go
Normal file
16
web/domains/resource/types.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package resource
|
||||
|
||||
type Type int32
|
||||
|
||||
const (
|
||||
TypeDynamic Type = iota + 1 // 动态
|
||||
TypeTunnel // 隧道
|
||||
TypePrivate // 私有
|
||||
)
|
||||
|
||||
type PssType int32
|
||||
|
||||
const (
|
||||
PssTypeTime PssType = iota + 1 // 包时
|
||||
PssTypeCount // 包量
|
||||
)
|
||||
24
web/domains/trade/types.go
Normal file
24
web/domains/trade/types.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package trade
|
||||
|
||||
type Type int32
|
||||
|
||||
const (
|
||||
TypePurchase Type = iota + 1 // 购买
|
||||
TypeRecharge // 充值
|
||||
)
|
||||
|
||||
type Method int32
|
||||
|
||||
const (
|
||||
MethodAlipay Method = iota + 1 // 支付宝
|
||||
MethodWeChat // 微信
|
||||
)
|
||||
|
||||
type Status int32
|
||||
|
||||
const (
|
||||
StatusPending Status = iota // 待支付
|
||||
StatusSuccess // 已支付
|
||||
StatusCanceled // 已取消
|
||||
StatusRefunded
|
||||
) // 已退款
|
||||
9
web/domains/user/types.go
Normal file
9
web/domains/user/types.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package user
|
||||
|
||||
type IdType int32
|
||||
|
||||
const (
|
||||
IdTypeNone IdType = iota // 未认证
|
||||
IdTypePersonal // 个人认证
|
||||
IdTypeEnterprise // 企业认证
|
||||
)
|
||||
Reference in New Issue
Block a user